I have found funny windows message.
It is described in MSDN so:
WM_NULL
The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore.
I propose competition on the best idea how to use it
Better, read all the documentation before -ing and say "funny".
From MSDN
WM_NULL
[...]
Remarks
For example, if an application has installed a WH_GETMESSAGE hook and wants to prevent a message from being processed, the GetMsgProc callback function can change the message number to WM_NULL so the recipient will ignore it.
As another example, an application can check if a window is responding to messages by sending the WM_NULL message with the SendMessageTimeout function.
Originally posted by Alex Rest
I have found funny windows message.
.
.
.
An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore.
I do not see anything funny about that. Just to give you few examples:
This message is used to test if application is still responding and is not hang. Task manager does that by using SendMessageTimeout with WM_NULL.
WM_NULL is also used to filter messages in WH_GETMESSAGE hook. Returning 0 from a hook does not prevent from processing a message. Replacing message with WM_NULL will filter message properly.
Another use is ActiveX control when you decide that it has toolbar and tooltips. Normally application message pump calls PreTranslateMessage; since ActiveX control does not have one, message hook can call PreTranslateMessage and if handled replace original message with WM_NULL.
There are only 10 types of people in the world: Those who understand binary and those who do not.
Bookmarks