Message Queues

The message queue coordinates the transmission of messages for a specified thread. Every thread can have only one message queue. When a message is passed to a window, it is placed on the message queue of the window's thread. The thread receives and dispatches the message.

There are two ways to pass a message to a window. The first is called posting a message; the second is called sending a message. In this section, the term "receiver's message queue" refers to the message queue of the thread that created the receiver window.