Microsoft DirectX 9.0

WaitDispatchingMessages

The WaitDispatchingMessages function waits for an object to be signaled, while dispatching window messages.

Syntax

DWORD WINAPI WaitDispatchingMessages(
    HANDLE hObject,
    DWORD dwWait,
    HWND hwnd = NULL,
    UINT uMsg = 0
    HANDLE hEvent = NULL
);

Parameters

hObject

Handle of the object to wait for.

dwWait

Time-out interval, in milliseconds.

hwnd

Optional handle to a window.

uMsg

Optional window message, specifying a message to dispatch.

hEvent

Optional handle to an event to wait for.

Return Value

Returns the value from the WaitForMultipleObjects function.

Remarks

If an object owns a window, it should dispatch window messages while waiting. This function enables the object to wait for an event, semaphore, or other mutual exclusion object while dispatching messages.

See Also