INPUT 未声明的标识符
(2011-10-12 16:35:56)
标签:
input_win32_winnt未声明的标识符 |
分类: VC |
原
今天用到了。INPUT 来实现键盘功能下边是代码
下边是MSDN的声明:
typedef struct tagINPUT {
} INPUT, *PINPUT, FAR* LPINPUT;
可是在我的机器上怎么也编译不过。我加一下头文件也不行。
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winuser.h.
只是看到OS版本要WIN CE 2.0 以及以后的版本。根本没想到在头文件中当前的OS版本
查了下MSDN里 _WIN32_WINNT 的定义后
Minimum system required | Macros to define |
---|---|
Windows Server |
NTDDI_VERSION >= NTDDI_LONGHORN |
Windows |
NTDDI_VERSION >= NTDDI_VISTA |
Windows Server |
NTDDI_VERSION >= NTDDI_WS03SP1 |
Windows Server |
NTDDI_VERSION >= NTDDI_WS03 |
Windows |
NTDDI_VERSION >= NTDDI_WINXPSP2 |
Windows |
NTDDI_VERSION >= NTDDI_WINXPSP1 |
Windows |
NTDDI_VERSION >= NTDDI_WINXP |
Windows |
NTDDI_VERSION >= NTDDI_WIN2KSP4 |
Windows |
NTDDI_VERSION >= NTDDI_WIN2KSP3 |
Windows |
NTDDI_VERSION >= NTDDI_WIN2KSP2 |
Windows |
NTDDI_VERSION >= NTDDI_WIN2KSP1 |
Windows |
NTDDI_VERSION >= NTDDI_WIN2K |
M inimum system required |
Macros to define |
---|---|
Windows Server |
_WIN32_WINNT>=0x0600
WINVER>=0x0600 |
Windows |
_WIN32_WINNT>=0x0600
WINVER>=0x0600 |
Windows Server |
_WIN32_WINNT>=0x0502
WINVER>=0x0502 |
Windows |
_WIN32_WINNT>=0x0501
WINVER>=0x0501 |
Windows |
_WIN32_WINNT>=0x0500
WINVER>=0x0500 |
Windows |
_WIN32_WINNT>=0x0400
WINVER>=0x0400 |
Windows |
_WIN32_WINDOWS=0x0500
WINVER>=0x0500 |
Windows |
_WIN32_WINDOWS>=0x0410
WINVER>=0x0410 |
Windows |
_WIN32_WINDOWS>=0x0400
WINVER>=0x0400 |
Internet Explorer 7.0 | _WIN32_IE>=0x0700 |
Internet Explorer 6.0 SP2 | _WIN32_IE>=0x0603 |
Internet Explorer 6.0 SP1 | _WIN32_IE>=0x0601 |
Internet Explorer 6.0 | _WIN32_IE>=0x0600 |
Internet Explorer 5.5 | _WIN32_IE>=0x0550 |
Internet Explorer 5.01 | _WIN32_IE>=0x0501 |
Internet Explorer 5.0, 5.0a, 5.0b | _WIN32_IE>=0x0500 |
Internet Explorer 4.01 | _WIN32_IE>=0x0401 |
Internet Explorer 4.0 | _WIN32_IE>=0x0400 |
Internet Explorer 3.0, 3.01, 3.02 | _WIN32_IE>=0x0300 |
我又到 项目里stdafs.h头文件里看了下。。我的OS版本定义是:
#ifndef
WINVER
#define WINVER 0x0400
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
我的是
所以我把它改成以下:
#ifndef
WINVER
#define WINVER 0x0500
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
所有问题解决了。