DispatchMessage

Syntax

LONG DispatchMessage(lpMsg)

This function passes the message in the MSG structure pointed to by the lpMsg parameter to the window function of the specified window.

Parameter Type/Description  
lpMsg LPMSG Points to an MSG data structure that contains message information from the Windows application queue.  
  The structure must contain valid message values. If lpMsg points to a WM_TIMER message and the lParam parameter of the WM_TIMER message is not NULL, then the lParam parameter is the address of a function that is called instead of the window function.  

Return Value

The return value specifies the value returned by the window function. Its meaning depends on the message being dispatched, but generally the return value is ignored.