EnumChildWindows这个方法在MSDN里查不到?? ----------------------- The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE BOOL EnumChildWindows( HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam ); Header Declared in Winuser.h, include Windows.h Import library User32.lib Minimum operating systems Windows 95, Windows NT 3.1
或者
GetWindow + GetNextWindow
或者
GetDlgItem
...
::GetDlgItem(hWndParent,ID_EDIT)->SetWindowText如果不知道,可以用EnmuChildWindows来枚举来找出这个编辑框,
如果只有一个这种编辑框,那么用GetClassName就可以过滤出来
不然还得加上其他特征来过滤出,比如位置大概在哪里之类的... 呵呵
EnumChildWindows遍历所有子控件!!一个一个判断!判断的条件就看你自己的了
-----------------------
The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE
BOOL EnumChildWindows( HWND hWndParent,
WNDENUMPROC lpEnumFunc,
LPARAM lParam
);
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
我打开了一个ie,进入新浪主页,然后在Spy++里找到这个进程。比如我想知道新浪主页最上面那个登陆邮箱输入用户名的EditBox,怎样操作?
并不是webbrowser的子窗口