AFX_MSG ResCOPY FROM MSDNClassWizard and AppWizard insert specially formatted comment delimiters in your source code files to the places in your files that ClassWizard can write to. AFX_MSG is used to the beginning and end of ClassWizard entries in your header file (.H) related to message maps://{{AFX_MSG(classname) ... //}}AFX_MSG
ResCOPY FROM MSDNClassWizard and AppWizard insert specially formatted comment delimiters in your source code files to the places in your files that ClassWizard can write to. AFX_MSG is used to the beginning and end of ClassWizard entries in your header file (.H) related to message maps://{{AFX_MSG(classname)
...
//}}AFX_MSG
也就是说,如果你把那些东西删了,你就用不了classwizard,而只能手工输入代码了
afx_msg 什么都没定义,是为以后扩充保留的。
它的定义如下:(具体在哪个文件里,我忘记了)
#define afx_msg
可以看出来它实际上是一个空定义!
ClassWizard entries in your header files
看来还得继续学习MFC的机制to tyscon(但为君故)
在gcc下如是弄(果然没有报错):
#include <iostream.h>
#define afx_msg;
afx_msg void OnAppAbout()
{
cout<<"..............";
}
int main()
{
OnAppAbout();
return 0;
}
谢谢大家了!