这是vc++6.0里的一段代码,我看不懂,麻烦高手帮我看看,最好把每一步简要解释一下,感激不尽
这是vc++6.0里的一段代码,我看不懂,麻烦高手帮我看看,最好把每一步简要解释一下,感激不尽BEGIN_MESSAGE_MAP(CPApp,CWinApp)//{{AF...
这是vc++6.0里的一段代码,我看不懂,麻烦高手帮我看看,最好把每一步简要解释一下,感激不尽
BEGIN_MESSAGE_MAP(CPApp, CWinApp)
//{{AFX_MSG_MAP(CPApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP() 展开
BEGIN_MESSAGE_MAP(CPApp, CWinApp)
//{{AFX_MSG_MAP(CPApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP() 展开
2个回答
展开全部
这是MFC里面定义的消息映射,斜杠部分不做解释了,本来就是注释
BEGIN_MESSAGE_MAP(CPApp, CWinApp) //消息映射起始
ON_COMMAND(ID_APP_ABOUT, OnAppAbout) //名字为ID_APP_ABOUT的按钮按下去之后响应OnAppAbout函数
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) //名字为ID_FILE_NEW的按钮按下去之后响应CWinApp::OnFileNew函数
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)//名字为ID_FILE_OPEN的按钮按下去之后响应CWinApp::OnFileOpen函数
ON_COMMAND(ID_FILE_PRINT_SETUP,CWinApp::OnFilePrintSetup) //名字为ID_FILE_PRINT_SETUP的按钮按下去之后响应CWinApp::OnFilePrintSetup函数
END_MESSAGE_MAP() //消息映射定义结束
BEGIN_MESSAGE_MAP(CPApp, CWinApp) //消息映射起始
ON_COMMAND(ID_APP_ABOUT, OnAppAbout) //名字为ID_APP_ABOUT的按钮按下去之后响应OnAppAbout函数
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) //名字为ID_FILE_NEW的按钮按下去之后响应CWinApp::OnFileNew函数
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)//名字为ID_FILE_OPEN的按钮按下去之后响应CWinApp::OnFileOpen函数
ON_COMMAND(ID_FILE_PRINT_SETUP,CWinApp::OnFilePrintSetup) //名字为ID_FILE_PRINT_SETUP的按钮按下去之后响应CWinApp::OnFilePrintSetup函数
END_MESSAGE_MAP() //消息映射定义结束
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询