我在一个Win32工程里面调用了函数GetMenuBarInfo
按MSDN的说法:Declared in Winuser.h, include Windows.h
可是我在编译的时候还是出错:error C2065: 'GetMenuBarInfo' : undeclared identifier
在函数前面加::会出另一个错:error C2039: 'GetMenuBarInfo' : is not a member of '`global namespace''这是怎么回事啊?? -_-~!
按MSDN的说法:Declared in Winuser.h, include Windows.h
可是我在编译的时候还是出错:error C2065: 'GetMenuBarInfo' : undeclared identifier
在函数前面加::会出另一个错:error C2039: 'GetMenuBarInfo' : is not a member of '`global namespace''这是怎么回事啊?? -_-~!
#define WINVER 0x0500
#include <windows.h>
GetMenuBarInfo 的函数原型只有在 WINVER 宏 >= 0x0500 时才定义。如果你不希望定义 #define WINVER 0x0500 宏,可以用 GetProcAddress() 的方法来使用。