The FindWindow function retrieves the handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. HWND FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName );The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search. SyntaxHWND FindWindowEx( HWND hwndParent, HWND hwndChildAfter, LPCTSTR lpszClass, LPCTSTR lpszWindow );
找到以后可以通过发消息来模拟。
GetDlgItem(IDC_STATIC1)->SendMessage(WM_LBUTTONDOWN,0,0);
注意后两个参数最好是你先用spy++捕捉一下,看看点上去是什么,然后照搬过来,不一定是0。
LPCTSTR lpClassName,
LPCTSTR lpWindowName );The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search. SyntaxHWND FindWindowEx( HWND hwndParent,
HWND hwndChildAfter,
LPCTSTR lpszClass,
LPCTSTR lpszWindow
);