这个比较麻烦,非三言两语能说清楚!如果你想用,建议你好好看看候sir得深入浅出MFC。或者干脆将SDK程序转换成MFC的。

解决方案 »

  1.   

    MFC中已经封装了WINDOWS。H所以不必再
    要WINDOWS。H
      

  2.   

    把 #include <windows.h>     改为    #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
    #include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #include <afxdisp.h>        // MFC Automation classes
    #include <afxdtctl.h> // MFC support for Internet Explorer 4 Commonntrols
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h> // MFC support for Windows Common Controls
    #endif // _AFX_NO_AFXCMN_SUPPORT