开发者

WM_POWERBROADCAST not received by message-only window in Windows XP

开发者 https://www.devze.com 2023-03-03 09:18 出处:网络
I\'m trying to find out whether broadcast messages will be sent to message only windows, i.e. created as:

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)), NU开发者_开发百科LL, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, hInstance, 0);

Thing is that I don't get any broadcast messages to that window... ;)


Your suspicions are correct. Message-only windows (those created by specifying HWND_MESSAGE for the hwndParent parameter of the CreateWindowEx function) do not receive broadcast notifications:

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.

Reference: MSDN

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号