BOOL PostMessage(hwnd, uMsg, wParam, lParam) | |||||
HWND hwnd; | /* handle of destination window | */ | |||
UINT uMsg; | /* message to post | */ | |||
WPARAM wParam; | /* first message parameter | */ | |||
LPARAM lParam; | /* second message parameter | */ |
The PostMessage function posts (places) a message in the message queue associated with the thread that created the given window and then returns without waiting for the thread to process the message. Messages in a message queue are retrieved by calls to the GetMessage or PeekMessage function.
hwnd
Identifies the window whose window procedure is to receive the message. If this parameter is 0xFFFFFFFF, the message will be posted to all overlapped or pop-up windows in the system. The message is not posted to child windows.
uMsg
Specifies the message to be posted.
wParam
Specifies additional message-dependent information.
lParam
Specifies additional message-dependent information.
The return value is TRUE if the function is successful or FALSE if an error occurs. To obtain extended error information, use the GetLastError function .
GetMessage, PeekMessage, PostThreadMessage, SendDlgItemMessage, SendMessage