由于VC6下的C++标准和VC9、VC10的C++标准不一样,VC9和VC10的C++更标准,所以项目源码转换的时候,有时会出现一些重定义的错误。
出现重定义加如下代码:
- //在stdafx.h文件中
-
- #define WINVER 0x0500
- #define _WIN32_WINNT 0x0500
所有定义为以下
Windows 95 and
Windows NT 4.0 WINVER=0x0400
Windows 98 and
Windows NT 4.0 _WIN32_WINDOWS=0x0410 and WINVER=0x0400
Windows NT 4.0 _WIN32_WINNT=0x0400 and WINVER=0x0400
Windows 98 _WIN32_WINDOWS=0x0410
Windows 2000 _WIN32_WINNT=0x0500 and WINVER=0x0500
Windows Me _WIN32_WINDOWS=0x0490
Windows XP and
Windows .NET Server _WIN32_WINNT=0x0501 and WINVER=0x0501
Internet Explorer 3.0, 3.01, 3.02 _WIN32_IE=0x0300
Internet Explorer 4.0 _WIN32_IE=0x0400
Internet Explorer 4.01 _WIN32_IE=0x0401
Internet Explorer 5.0, 5.0a, 5.0b _WIN32_IE=0x0500
Internet Explorer 5.01, 5.5 _WIN32_IE=0x0501
Internet Explorer 6.0 _WIN32_IE=0x0560 or
_WIN32_IE=0x0600
|