您的位置:首页 > 其它

专门用于消息回调窗口的窗口标识HWND_MESSAGE(创建一个非可视、没有z-order的窗口)

2017-07-06 20:39 525 查看
HWND_MESSAGE
Message-Only Windows


A message-only window enables you to send and receive messages. It is
not visible, has no z-order, cannot be enumerated, and does not
receive broadcast messages. The window simply dispatches messages. To
create a message-only window, specify the HWND_MESSAGE constant or a
handle to an existing message-only window in the hWndParent parameter
of the CreateWindowEx function. You can also change an existing window
to a message-only window by specifying HWND_MESSAGE in the
hWndNewParent parameter of the SetParent function. To find
message-only windows, specify HWND_MESSAGE in the hwndParent parameter
of the FindWindowEx function. In addition, FindWindowEx searches
message-only windows as well as top-level windows if both the
hwndParent and hwndChildAfter parameters are NULL.
see: https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599(v=vs.85).aspx


示例:
HWND hWnd = CWindowImpl::Create(HWND_MESSAGE, CWindow::rcDefault, NULL, WS_POPUP, 0, (UINT)0);

To create a message-only window, supply HWND_MESSAGE or a handle to an existing message-only window.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599(v=vs.85).aspx#message_only
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐