Some documents contain the following text:
Declare_message_map()
Note:
Each csf-target derived class in the user program must provide message ing to process messages. Use the declare_message_map macro at the end of the class definition. Next, use the begin_message_map macro in the. cpp file that defines the class member function, the list under the macro item of each user message processing function, and the end_message_map macro.
Note:
If any member is defined after declare_message_map, a new access type (public, private, and protected) must be specified for them ).
I think he did not describe well. My understanding is:
As long as there is: as long as it is a csf-target (used for all the base classes that can map messages) derived class, there must be message ing to process messages, there will be a declare_message_map macro at the end of the class description file, the class definition file contains the begin_message_map macro and end_message_map macro to process user messages.
Begin_message_map (parameter 1, parameter 2), parameter 1 is the class name of the class, and parameter 2 is the class name of the base class of the class.
Here, on_message (parameter 1, parameter 2), parameter 1 is the response message, and parameter 2 is the function name corresponding to the message.