您的位置:首页 > 其它

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可以获取到.

-----------------------------------------------------------------------------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: