WaitMessage

2.x

  void WaitMessage(void)    

The WaitMessage function yields control to other applications when an application has no other tasks to perform. The WaitMessage function suspends the application and does not return until a new message is placed in the application's queue.

Parameters

This function has no parameters.

Return Value

This function does not return a value.

Comments

The WaitMessage function normally returns immediately if there is a message in the queue. If an application has used the PeekMessage function but not removed the message, however, WaitMessage does not return until the message is received. Applications that use the PeekMessage function should remove any retrieved messages from the queue before calling WaitMessage.

The GetMessage, PeekMessage, and WaitMessage functions yield control to other applications. Using these functions is the only way to allow other applications to run. Applications that do not call any of these functions for long periods prevent other applications from running.

See Also

GetMessage, PeekMessage