message loop
A program loop that retrieves messages from a thread's message queue and dispatches them to the appropriate window procedures. See also message queue.