GetMessageW3w
Getmessage32w (user32.274) retrieve next message
Usage
BOOL32 GetMessageW
(
MSG32 *lpmsg,
HWND32 hwnd,
UINT32 min,
UINT32 max
);
Parameters
MSG32 *lpmsg
|
Buffer to receive message. |
|---|---|
HWND32 hwnd
|
Restrict to messages for hwnd. |
UINT32 min
|
Minimum message to receive. |
UINT32 max
|
Maximum message to receive. |
Overview
GetMessage retrieves the next event from the calling thread's queue and deposits it in *lpmsg.
If _hwnd_ is not NULL, only messages for window _hwnd_ and its children as specified by IsChild() are retrieved. If _hwnd_ is NULL all application messages are retrieved.
_Min_ and _max_ specify the range of messages of interest. If min==max==0, no filtering is performed. Useful examples are WM_KEYFIRST and WM_KEYLAST to retrieve keyboard input, and WM_MOUSEFIRST and WM_MOUSELAST to retrieve mouse input.
WM_PAINT messages are not removed from the queue; they remain until processed. Other messages are removed from the queue.
Returns
-1 on error, 0 if message is WM_QUIT, nonzero otherwise.
Conformance
ECMA-234, Win32.