学习vc,看到这样的声明,不知道afx_msg是什么东西,表示什么!
void已经是函数返回值了,难道...?
谢谢回答!

解决方案 »

  1.   

    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
      

  2.   

    afx_msg是给MFC classwiard作的标记,表示这个.cpp文件中classwiard应该插入代码的地方。  如果把{{//afx_msg ......等类似的符号删了,classwizard 就会报错。
    也就是说,如果你把那些东西删了,你就用不了classwizard,而只能手工输入代码了
    afx_msg 什么都没定义,是为以后扩充保留的。
    它的定义如下:(具体在哪个文件里,我忘记了)
    #define afx_msg
    可以看出来它实际上是一个空定义!
      

  3.   

    to seu07201213(汪洋中的一片叶子) 
    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;
    }
    谢谢大家了!