MFC BEGIN_MESSAGE_MAP()
在BEGIN_MESSAGE_MAP()和END_MESSAGE_MAP()之间添加你的消息响应函数,为每个消息处理函数加入一个入口
在我们的记事本应用中 我们是这样写的
BEGIN_MESSAGE_MAP(CNotePadDlg, CDialog)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_COMMAND(ID_HELP_ABOUT, OnHelpAbout)
ON_WM_CLOSE()
ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
ON_COMMAND(ID_EDIT_CUT, OnEditCut)
ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
ON_COMMAND(ID_EDIT_DATE, OnEditDate)
ON_WM_SIZE()
ON_WM_DROPFILES()
ON_COMMAND(ID_FILE_EXIT, OnFileExit)
ON_COMMAND(ID_FILE_NEW, OnFileNew)