:\1205D\1205D.cpp(400) : error C2065: 'AfxMessageBox' : undeclared identifier

解决方案 »

  1.   

    我在原來的代碼上加這句就錯了,原來的所有代碼編譯都通過了AfxMessageBox("test");
      

  2.   

    你是在MFC工程下用这个函数吗?
      

  3.   

    在 win32 application 里
      

  4.   

    包函头文件
    #include <afxwin.h>         // MFC core and standard components
    去掉
    //#include <windows.h>
    在项目设置里先使用MFC
      

  5.   

    to Goldcastle(金城) #include <afxwin.h>  和  #include <afx.h>有什麼區別,我把加入時會有這樣的錯誤g:\1205d\resource.h(18) : warning C4005: 'IDC_STATIC' : macro redefinitionresource.h 中:#define IDC_STATIC                      -1