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.
WinDispatchMsg (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
MRESULT WinDispatchMsg(hab, pqmsg)
HAB hab;        /* handle of the anchor block             */
PQMSG pqmsg;    /* address of structure for message queue */
 
The WinDispatchMsg dispatches a message to a window. It is typically used to
dispatch a message retrieved with the WinGetMsg function. Unlike the
WinSendMsg function, the WinDispatchMsg function does not call any hooks
installed with the WinSetHook function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hab        Identifies an anchor block.
 
pqmsg      Points to a QMSG structure that contains the message.
 
Return Value
 
The return value is the value returned by the window procedure that was
called.
 
Example
 
This example calls WinGetMsg to retrieve a message and WinDispatchMsg to
send the message.
 
HAB hab;
QMSG qmsg;
 
while (WinGetMsg(hab,   /* handle to the anchor block             */
        &qmsg,          /* address of the message queue structure */
        (HWND) NULL,    /* accept messages for any window         */
        0,              /* first message to accept                */
        0))             /* accept all messages                    */
    WinDispatchMsg(hab, &qmsg);
 
See Also
 
WinGetMsg, WinProcessDlg, WinSendMsg, WinSetHook, QMSG