专门用于消息回调窗口的窗口标识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
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
相关文章推荐
- 专门用于消息回调窗口的窗口标识
- vs2012偷梁换柱法之改变一个没有m_hWnd的active控件窗口大小
- windows 下在一个进程中使用createprocess创建一个窗口进程,并获取这个窗口的HWND句柄
- [导入]创建一个没有窗口的程序
- [导入]创建一个没有窗口的程序
- 用VS创建一个win32窗口,编译运行都可以,但那个窗口没有显示出来(孙鑫老师第一课问题)
- 用CWnd创建一个没有父窗体的POPUP窗口
- 创建一个没有窗口的程序
- (转)用eclipse创建一个j2ee的web工程后,左面projects窗口中的项目如何没有显示webRoot文件夹,除了src的文件夹,其他都不显示
- 一个啥都没有的Windows窗口 用于学习Windows程序的基本风格
- [导入]创建一个没有窗口的程序
- 一个线程创建之初是没有消息队列的
- 创建一个没有窗口的程序
- vs2012偷梁换柱法之改变一个没有m_hWnd的active控件窗口大小
- QT创建窗口程序、消息循环和WinMain函数(为主线程建立了一个QEventLoop,并执行exec函数)
- UNICODE 和_UNICODE 的区别,前者没有下划 线,专门用于Windows 头文件;后者有一个前缀下划线,专门用于C 运行时头文 件。
- Delphi使用TObject类对象创建接受window消息(使用Classes.AllocateHWnd为对象创建一个尺寸为0的窗口,从而有了Handle)good
- [导入]创建一个没有窗口的程序
- 用SDK创建一个简单的窗口
- 如何创建一个用弹出窗口来查看详细信息的超链接列