How to define your own WM message (e.g. WM_CLOSE, etc.) that can be processed by a C ++ message pump?
If possible even.
It depends on what you are using the message for. This link shows a breakdown of the "address space" for Win32 messages.
WM_USER . WM_USER " . , , ".
WM_USER
, WM_APP.
WM_APP
RegisterWindowMessage , , . " , , ", RegisterWindowMessage, .
RegisterWindowMessage
, , , WM_USER:
#define WM_MY_MESSAGE (WM_USER + 1000)
ON_COMMAND/ON_NOTIFY.
, , . - .
, RegisterWindowMessage.
/ .
You can use "RegisterWindowMessage" to create new unique messages.
from MSDN: "The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or sending messages."