Declare_message_map ()

Source: Internet
Author: User

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.

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.