消息映射表示例 BEGIN MESSAGE MAP(the Class, base Class RAFX MSG MAP(the Class) ON WM SETFOCUSO ON WM CREATEO ON WM DESTROYO ON WM CLOSEO ON WM SIZEO ON MESSAGECWM COMMANDHELP, OnCommandHelp ON MESSAGECWM HELPHITTEST, On HelpHitTest ON UPDATE COMMAND UI(ID VIEW STATUS BAR OnUpdate ControlBarMenu) ON NOTIFY EX RANGE(TTN NEEDTEXTW, 0, OXFFFF On ToolTip Text) ∥} AFX MSG MAP END MESSAGE MAP消息映射表示例 BEGIN_MESSAGE_MAP(theClass, baseClass) //{{AFX_MSG_MAP(theClass) ON_WM_SETFOCUS() ON_WM_CREATE() ON_WM_DESTROY() ON_WM_CLOSE() ON_WM_SIZE() ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp) ON_MESSAGE(WM_HELPHITTEST, OnHelpHitTest) ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS_BAR, OnUpdateControlBarMenu) ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipText) //}}AFX_MSG_MAP END_MESSAGE_MAP