To post a message, call the PostMessage function. PostMessage combines the message identifier and parameters into a single message and places it on the receiving window message queue. Eventually, the receiving window message loop removes the message from the message queue and dispatches it to the appropriate window procedure.
PostMessage is an asynchronous function. Windows CE does not synchronize between the sending thread and the receiving thread for posted messages. When the call to PostMessage returns, there is no guarantee that the window procedure for the receiving window has processed the message. In fact, if the message was posted to the same thread, the window procedure has not processed the message.
You can post a message without specifying a window. If you supply a NULL window handle when you call the PostMessage function, the message is posted to the queue associated with the current thread; because no window handle is specified, you must process the message directly from the message loop. This creates a message that applies to the entire application instead of a specific window.