Windows XP 中的纯消息窗口未接收到 WM_POWERBROADCAST
我试图找出广播消息是否会发送到仅消息窗口,即创建为:
hWnd = CreateWindow(MAKEINTATOM(RegisterClass(&wnd)), NULL, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, hInstance, 0);
问题是我没有收到任何广播消息到该窗口...;)
I'm trying to find out whether broadcast messages will be sent to message only windows, i.e. created as:
hWnd = CreateWindow(MAKEINTATOM(RegisterClass(&wnd)), NULL, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, hInstance, 0);
Thing is that I don't get any broadcast messages to that window... ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

你的怀疑是正确的。仅消息窗口(通过为
CreateWindowEx
函数的hwndParent
参数指定HWND_MESSAGE
创建的窗口)不会接收广播通知:参考:MSDN
Your suspicions are correct. Message-only windows (those created by specifying
HWND_MESSAGE
for thehwndParent
parameter of theCreateWindowEx
function) do not receive broadcast notifications:Reference: MSDN