24,855
社区成员
发帖
与我相关
我的任务
分享
hMain = (HWND)FindWindow(NULL, L"有信");
//SendMessage(hMain, WM_CLOSE, 0, 0); //居然关闭不了 汗= =!
//DestroyWindow(hMain);
HWND hChild = GetWindow(hMain,GW_CHILD);//"" 3个有效句柄
HWND step0_1 = GetWindow(hChild,GW_HWNDFIRST);
HWND step0_2 = GetWindow(step0_1,GW_HWNDNEXT);
HWND step0_3 = GetWindow(step0_2,GW_HWNDNEXT);
HWND hChild1 = GetWindow(hChild,GW_CHILD);//"" "" "" 4个有效句柄
HWND step1_1 = GetWindow(hChild1,GW_HWNDFIRST);
HWND step1_2 = GetWindow(step1_1,GW_HWNDNEXT);
HWND step1_3 = GetWindow(step1_2,GW_HWNDNEXT);
HWND step1_4 = GetWindow(step1_3,GW_HWNDNEXT);
HWND step1_5 = GetWindow(step1_4,GW_HWNDNEXT);
HWND hChild2 = GetWindow(hChild1,GW_CHILD);//"" "UXTab" 2 8个有效句柄
HWND step2_1 = GetWindow(hChild2,GW_HWNDFIRST);
HWND step2_2 = GetWindow(step2_1,GW_HWNDNEXT);
HWND step2_3 = GetWindow(step2_2,GW_HWNDNEXT);
HWND step2_4 = GetWindow(step2_3,GW_HWNDNEXT);
HWND step2_5 = GetWindow(step2_4,GW_HWNDNEXT);
HWND step2_6 = GetWindow(step2_5,GW_HWNDNEXT);
HWND step2_7 = GetWindow(step2_6,GW_HWNDNEXT);
HWND step2_8 = GetWindow(step2_7,GW_HWNDNEXT);
HWND step2_9 = GetWindow(step2_8,GW_HWNDNEXT);
HWND step2_10 = GetWindow(step2_9,GW_HWNDNEXT);
HWND step2_11 = GetWindow(step2_10,GW_HWNDNEXT);
HWND step2_12 = GetWindow(step2_11,GW_HWNDNEXT);
HWND step2_13 = GetWindow(step2_12,GW_HWNDNEXT);
HWND step2_14 = GetWindow(step2_13,GW_HWNDNEXT);
HWND step2_15 = GetWindow(step2_14,GW_HWNDNEXT);
HWND step2_16 = GetWindow(step2_15,GW_HWNDNEXT);
HWND step2_17 = GetWindow(step2_16,GW_HWNDNEXT);
HWND step2_18 = GetWindow(step2_17,GW_HWNDNEXT);
HWND hChild3 = GetWindow(hChild2,GW_CHILD);//"" * 16 1个有效句柄
HWND step3_1 = GetWindow(hChild3,GW_HWNDFIRST);
HWND step3_2 = GetWindow(step3_1,GW_HWNDNEXT);
HWND step3_3 = GetWindow(step3_2,GW_HWNDNEXT);
HWND step3_4 = GetWindow(step3_3,GW_HWNDNEXT);
HWND step3_5 = GetWindow(step3_4,GW_HWNDNEXT);
HWND step3_6 = GetWindow(step3_5,GW_HWNDNEXT);
HWND step3_7 = GetWindow(step3_6,GW_HWNDNEXT);
HWND step3_8 = GetWindow(step3_7,GW_HWNDNEXT);
HWND step3_9 = GetWindow(step3_8,GW_HWNDNEXT);
HWND step3_10 = GetWindow(step3_9,GW_HWNDNEXT);
HWND step3_11 = GetWindow(step3_10,GW_HWNDNEXT);
HWND step3_12 = GetWindow(step3_11,GW_HWNDNEXT);
HWND step3_13 = GetWindow(step3_12,GW_HWNDNEXT);
HWND step3_14 = GetWindow(step3_13,GW_HWNDNEXT);
HWND step3_15 = GetWindow(step3_14,GW_HWNDNEXT);
HWND step3_16 = GetWindow(step3_15,GW_HWNDNEXT);
HWND step3_5 = GetWindow(step3_4,GW_HWNDNEXT);//4060e 句柄完全正确的
CWnd *pWnd=CWnd::FromHandle(hChild); //下面三行我是网上看到的(需要窗口置顶才能进行控件点击操作 但窗口置顶好像没起作用 我手动激活了窗口 调用单击命令也没反映)
BringWindowToTop(hChild);
pWnd->SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
::PostMessage(step3_5,BM_CLICK,0,0);