win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinPostMsg (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
BOOL WinPostMsg(hwnd, msg, mp1, mp2)
HWND hwnd;     /* handle of the window to post message to */
USHORT msg;    /* message                                 */
MPARAM mp1;    /* first message parameter                 */
MPARAM mp2;    /* second message parameter                */
 
The WinPostMsg function posts a message to the message queue for the
specified window.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwnd       Identifies the window to post the message to. If this parameter
           is NULL, the message is posted to the queue associated with the
           current thread.
 
msg        Specifies the message.
 
mp1        Specifies the first message parameter.
 
mp2        Specifies second message parameter.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Comments
 
The following are some of the differences between WinPostMsg and
WinSendMsg:
 
♦  WinPostMsg returns immediately. WinSendMsg waits for the receiver to
   return.
 
♦  A thread that does not have a message queue can still call WinPostMsg. It
   cannot call WinSendMsg.
 
♦  Calling WinSendMsg to send a message to another thread is costly in terms
   of CPU time. This is not true of the WinPostMsg.
 
See Also
 
WinBroadcastMsg, WinGetMsg, WinPeekMsg, WinSendMsg