WaitDispatchingMessages function

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.

Requirements

Header
Wxutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

Miscellaneous Helper Functions