在将VC6.0程序转换成VS2010之后,弹出此错误,有两种方法可以解决此问题,根据具体情况设定,呵呵
(1)修改stdafx.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 <afxcview.h>
修改如下:
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0501 //可根据系统类型设定
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxcview.h>
(2)通过项目“属性管理器”属性页设置
第一步:打开“C/C++”中“预处理器”,选中“预处理定义”项,如图所示:
第二步:点击“编辑”按钮,弹出“预处理定义”编辑框,修改“_WIN32_WINNT”的值,点击确定即可。