To support message maps, MFC supplies the following macros:为支持消息映射,MFC提供了如下的宏:
Declares that a message map will be used in a class to map messages to functions (must be used in the class declaration). 声明消息映射会在一个类中使用,把消息映射到函数上(必须在类声明中使用)。 | |
Begins the definition of a message map (must be used in the class implementation).开始消息映射的定义(必须在类实现中使用)。 | |
Ends the definition of a message map (must be used in the class implementation).结束消息映射的定义(必须在类的实现中使用)。 |
Indicates which function will handle a specified command message.表示函数会处理指定的命令消息。 | |
Indicates which function will handle a specified control-notification message.表示函数会处理指定的控件通知消息。 | |
Indicates which function will handle a user-defined message.表示函数会处理用户自定义的消息 | |
Indicates which function will handle a menu command from a DocObject or its container.表示函数会处理来自文档对象或者它的容器的菜单命令 | |
Indicates which function will handle a registered user-defined message.表示似函数会处理注册的用户自定义消息。 | |
Indicates which function will handle a registered user-defined message when you have aCWinThread class.表示函数会处理CWinThread中的注册的用户自定义消息 | |
Indicates which function will handle a user-defined message when you have a CWinThread class.表示线程函数会处理CWinThread中的用户自定义消息。 | |
Indicates which function will handle a specified user-interface update command message.表示函数会处理指定的用户界面更新命令消息。 |
Indicates which function will handle the range of command IDs specified in the first two parameters to the macro.表示函数会处理由宏中前两个参数指定的范围所表示的命令ID | |
Indicates which update handler will handle the range of command IDs specified in the first two parameters to the macro.表示更新处理函数会处理由宏中前两个参数指定的范围所表示的命令ID。 | |
Indicates which function will handle notifications from the range of control IDs specified in the second and third parameters to the macro. The first parameter is a control-notification message, such asBN_CLICKED.表示函数会处理由宏的第三第四参数指定的控件ID所表示的范围的通知。第一个参数表示控件通知消息,例如BN_CLICKED。 |
For more information on message maps, the message-map declaration and demarcation macros, and the message-mapping macros, seeMessage Maps andMessage Handling and Mapping Topics. For more information about message-map ranges, seeHandlers for Message-Map Ranges.(更多的信息,参见……)