Windows Messaging mechanism
Windows is a message-driven operating system. such as drawing the window's message wm_paint.
Structure definition:
Message Classification-Send route
The queue message. Windows maintains a message queue for each running program, which is taken out by the application itself, such as Wm_timer.
Non-queue messages. Such messages come from a specific Windows function, such as the UpdateWindow () function, which sends a WM_PAINT redraw message directly to the window handler function.
Message Classification-Sender
System messages. is a predefined uint constant.
User messages. Apply through the RegisterWindowMessage () function.
Sending of messages
PostMessage (), an asynchronous function that is returned directly after it is placed in the queue.
SendMessage (), the synchronization function, does not enter the message queue, the execution is completed before returning.
Get the message
The API uses the switch case statement.
MFC is encapsulated with message maps. (Nature or API)