''Msg Wait For Multiple Objects '' Has the same behavior as WaitForMultipleObjects, but it can be told to return for other reasons, such as a (window or thread) message being received. The flag QS_ALLINPUT requests that it return for all reasons, and enables dispatching of callbacks and other events that require a thread to be in an "alertable" state.