从 Visual C++ 2008 开始,Visual C++ 不支持面向 Windows 95、Windows 98、Windows ME 或 Windows NT。如果您的WINVER 或 _WIN32_WINNT 宏被指定到这些 Windows 版本之一,则需要修改宏。当升级从 Visual C++ 的以前版本创建的项目时,如果将WINVER 或 _WIN32_WINNT 宏指定到不再受支持的 Windows 版本,可能会看到与这些宏相关的编译错误。
若要修改宏,请在头文件中添加以下行:
#define WINVER 0x0500 #define _WIN32_WINNT 0x0500
这将以 Windows 2000 操作系统为目标。其他有效值包括 0x0501(用于 Windows XP)、0x0502(用于 Windows Server 2003)和 0x0600(用于 Windows Vista)。
需要你自已在stdafx.h头文件中定义。编译器根据此宏来确定windows的版本,如果你需要使用高版本的WIN32函数,只有你定义了此宏后才能使用
Windows
Windows
Windows
Windows
Windows
Internet
Internet
Internet
Internet
Internet
Internet