Name
PostMessage
Synopsis
This function simply posts a message to the message queue of one or more threads. After posting the message, the PostMessage function returns; it does not wait for a response to the posted message, as does SendMessage:
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, ByVal lParam As Long) As Long
Parameters
-
hwnd The window handle that the message is directed to. If this parameter is set to
HWND_BROADCAST, the message is posted to all top-level windows in the system. If this parameter is set toNULL, the message is posted to the message queue of the thread in which this function was called.-
uMsg The message identifier.
-
lParam The second parameter of the message.
-
wParam The first parameter of the message.
Return Value
The return value is nonzero if the function succeeded in posting the message; otherwise, returns a zero value.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access