Da MSDN

"The WaitMessage function suspends the thread and does not return until a new message is placed in the thread's message queue."