Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Diff between PostMessage and SendMessage?

diff postmessage sendmessage
0
Posted

Diff between PostMessage and SendMessage?

0

PostMessage : This function copies the message into the message queue and returns immdly. If the message queue is full then this method will return an error value. You can use the PostThreadMessage function to post a message to a specific thread message queue SendMessage : This function sends a message DIRECTLY to the window procedure and waits until the procedure process the message and returns a result. Note: Every thread that creates a window owns a message loop. The system automatically creates a message queue for each thread. If one thread creates multiple windows then all the windows share the single messageloop which the thread owns. A message queue needs only a message loop, no matter how many windows the application has. DispatchMessage function can dispatch the message to its target window because the MSG message structure includes the target window handle of a message.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123