有以下C文件.
#include <windows.h>DWORD dwHandleCount = GetGuiResources(NULL,GR_USEROBJECTS);编译时报错:
d:\project\taskmgr\new.c(3) : warning C4013: 'GetGuiResources' undefined; assuming extern returning int
d:\project\taskmgr\new.c(3) : error C2065: 'GR_USEROBJECTS' : undeclared identifier我查看了声明GetGuiResources函数的头文件winuser.h确实包含在windows.h中,请问是怎么回事?
#include <windows.h>DWORD dwHandleCount = GetGuiResources(NULL,GR_USEROBJECTS);编译时报错:
d:\project\taskmgr\new.c(3) : warning C4013: 'GetGuiResources' undefined; assuming extern returning int
d:\project\taskmgr\new.c(3) : error C2065: 'GR_USEROBJECTS' : undeclared identifier我查看了声明GetGuiResources函数的头文件winuser.h确实包含在windows.h中,请问是怎么回事?
解决方案 »
- 请教各位,“金山卫士”用的是不是COM技术
- mobile浏览器IDocHostUIHandler接口怎么建立
- 深入详解MFC中,添加快捷菜单,为何照书上抄的代码,报内存错误?内文中是OnRButtonDown的响应函数。
- Javascript调用activex,属性无效??
- 关于COM的几个小问题,我觉得比较难理解,期待耐心的热心的人
- 能解释下这种现象的原因么(分不是 问题)
- ??? 如何给一个button加一个icon?
- 请问小问题急急急!!
- 我在用IHTMLTableCell->put_width方法和IHTMLTableCell->put_bgColor方法时VARIANT类型参数使用有问题?
- 我想作汉化软件的工作?请高手带我入门!
- 有关学习winpcap的两个问题
- 请问VC中自定义消息和普通处理有什么区别??
Windows XP _WIN32_WINNT>=0x0501
Windows 2000 _WIN32_WINNT>=0x0500
Windows NT 4.0 _WIN32_WINNT>=0x0400
Windows Me _WIN32_WINDOWS=0x0490
Windows 98 _WIN32_WINDOWS>=0x0410
Internet Explorer 6.0 _WIN32_IE>=0x0600
Internet Explorer 5.01, 5.5 _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
自己看一下自己的系统设置~~~
_WIN32_WINNT>=0x0500
是版本问题~~~
GetGuiResources:
Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
所以你加上_WIN32_WINNT定义为大于0x0500
#define GR_GDIOBJECTS 0 /* Count of GDI objects */
#define GR_USEROBJECTS 1 /* Count of USER objects */DWORD GetGuiResources(HANDLE hProcess, DWORD uiFlags);
#endif /* WINVER >= 0x0500 */请问在头文件中怎么添加你说的那条语句?
#define WINVER 0x0500 /* version 5.0 */
#endif /* !WINVER */
然后你在上面添加进去~~~
或者你直接加到#include "StdAfx.h"~~~
这不是合法的语句啊?