Get Child Window HWND
2011-05-08 15:57
281 查看
-----------------------------------------------------------------------------------------------------------------
1. EnumWindow(hwnd_parent, Fun, lparam)
EnumChildWindow
SendMessage 可以做单向, 环路通知(最好不要环路, 只剩单向)
2. FindWindow(class_name, window_name) 只找顶层的?
FindWindowEx(hwnd_parent, xxx, class_name, window_name) 只找1层子窗口?
GetDlgItem(ID) 只找子控件?
GetWindow(hwnd, NEXT|FIRST|OWERN|CHILD)
GetNextWindow(hwnd, NEXT|PREV)
GetTopWindow
3. 记录hwnd (在多线程UI中不好用. 因为UI线程无法传入参数. g_hwnd 全局不好)
-----------------------------------------------------------------------------------------------------------------
1. 子窗口 没title. FindWindow不好使
2. GetDlgItem只能通过控件ID获取控件, 不能获取 子窗口.
3. m_ie.Create(NULL, L"bb", WS_CHILD | WS_VISIBLE | WS_POPUP, rect, this, 111);
Create窗口的ID, GetWindowLong(hwnd, GWL_ID); 获取不到. 但tree可以获取到.
-----------------------------------------------------------------------------------------------------------------
1. EnumWindow(hwnd_parent, Fun, lparam)
EnumChildWindow
SendMessage 可以做单向, 环路通知(最好不要环路, 只剩单向)
2. FindWindow(class_name, window_name) 只找顶层的?
FindWindowEx(hwnd_parent, xxx, class_name, window_name) 只找1层子窗口?
GetDlgItem(ID) 只找子控件?
GetWindow(hwnd, NEXT|FIRST|OWERN|CHILD)
GetNextWindow(hwnd, NEXT|PREV)
GetTopWindow
3. 记录hwnd (在多线程UI中不好用. 因为UI线程无法传入参数. g_hwnd 全局不好)
-----------------------------------------------------------------------------------------------------------------
1. 子窗口 没title. FindWindow不好使
2. GetDlgItem只能通过控件ID获取控件, 不能获取 子窗口.
3. m_ie.Create(NULL, L"bb", WS_CHILD | WS_VISIBLE | WS_POPUP, rect, this, 111);
Create窗口的ID, GetWindowLong(hwnd, GWL_ID); 获取不到. 但tree可以获取到.
-----------------------------------------------------------------------------------------------------------------
相关文章推荐
- datawindowchild的GetSQLSelect()方法获取 sql
- GetPixel GetRValue WM_GETTEXT WindowFromPoint ::GetClassName(WinHwnd,strClassName,255);
- HWND GetWindowHandleByPID(DWORD dwProcessID)
- 使用GetActiveWindow函数获取当前窗口HWND句柄
- Frame_GetWindow(::GetDesktopWindow(), GW_CHILD)
- Get HWND of the WPF Window
- get hwnd of each window with python
- 从getChildByTag函数看Menu与MenuItem之间的关系
- PowerShell中使用Get-ChildItem命令读取目录、文件列表使用例子和小技巧
- WindowFromPoint和GetCursorPos
- selenium加载chrome maximize_window() 提示错误cannot get automation extension
- 如何取得View的位置之View.getLocationInWindow()的小秘密
- window.getSelection和document.selection
- Silverlight ChildWindow 诡异的bug
- getChildByName()与getChildAt()效率比较
- GEMR: Get the parent window for view
- GetConsoleWindow ()函数找不到的解决办法
- WinCE GetForegroundWindow 使用的困惑
- Get the window data(lamda,flux, true) from a center point and the window width
- API窗口句柄函数FindWindow//GetTopWindow/GetForegroundWindow