Summary of C + + technical issues-10th: similarities and differences between SendMessage and PostMessage in MFC

Source: Internet
Author: User
Tags message queue
There are three sources of application messages: hardware messages (peripherals such as mouse and keyboard), postmessage messages, and SendMessage messages, all of which can send message events to driver execution.
The message flow graph is as follows.
The hardware message response process is as follows.
① messages into the system message queue.
② messages are distributed to the application message queue.
The ③ application loops through the message.
The ④ message handler function executes.
PostMessage directly into the above step ②, puts the message in the message queue and returns immediately.

SendMessage directly into the above step ④, Call the message handler function, wait for the function to return after the completion of execution.


Summary of C + + technical issues-10th: similarities and differences between SendMessage and PostMessage in MFC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.