开发者

WM_POWERBROADCAST not received by message-only window in Windows XP

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜