已经解决
用了个循环就搞定了
hwnd = FindWindow(vbNullString, "打开 ")
Label1.Caption = hwnd
hWnd2 = FindWindowEx(hwnd, 0, "DUIViewWndClassName", vbNullString)
Label2.Caption = hWnd2
hWnd3 = FindWindowEx(hWnd2, 0, "DirectUIHWND", vbNullString)
Label3.Caption = hWnd3
hWnd4 = FindWindowEx(hWnd3, 0, "FloatNotifySink", vbNullString)
Label4.Caption = hWnd4
hWnd5 = FindWindowEx(hWnd4, 0, "Button", "参考(&F)...")
Do While hWnd5 = 0
hWnd4 = FindWindowEx(hWnd3, hWnd4, "FloatNotifySink", vbNullString)
hWnd5 = FindWindowEx(hWnd4, 0, "Button", "参考(&F)...")
Loop
Label5.Caption = hWnd5
[此贴子已经被作者于2017-12-2 15:54编辑过]