楼主到MSDN里面查看LoadCursor Function的时候,在下面有: HCURSOR LoadCursor( HINSTANCE hInstance, LPCTSTR lpCursorName ); 其中: IDC_APPSTARTING Standard arrow and small hourglass IDC_ARROW Standard arrow IDC_CROSS Crosshair IDC_HAND Windows 98/Me, Windows 2000/XP: Hand//特殊一点~~~ IDC_HELP Arrow and question 这个是版本说明: Minimum system required Macros to define Windows Server 2003 family _WIN32_WINNT>=0x0502 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 也就是: For example, to use the features specifically ed for Windows 2000 in the header files, you need to explicitly define _WIN32_WINNT as 0x0500 or greater. You can define the symbols using the #define statement in each source file, or by specifying the /D_WIN32_WINNT=0x0500 compiler option supported by Visual C++.
Windows 98/Me, Windows 2000/XP: Hand//特殊一点~~~ 这一行是什么意思?
#define _WIN32_WINNT 0x0500 #include "winuser.h" int i=IDC_HAND;还是不行
#if(WINVER >= 0x0500)
#define IDC_HAND MAKEINTRESOURCE(32649)
#endif /* WINVER >= 0x0500 */
那要怎么做才可以用IDC_HAND?
是因为你没有加进来资源文件了~~
AfxGetApp()->LoadCursor(IDC_ARROW)没有问题,但我并没有定义IDC_ARROW
HCURSOR LoadCursor( HINSTANCE hInstance,
LPCTSTR lpCursorName
);
其中:
IDC_APPSTARTING
Standard arrow and small hourglass
IDC_ARROW
Standard arrow
IDC_CROSS
Crosshair
IDC_HAND
Windows 98/Me, Windows 2000/XP: Hand//特殊一点~~~
IDC_HELP
Arrow and question
这个是版本说明:
Minimum system required Macros to define
Windows Server 2003 family _WIN32_WINNT>=0x0502
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
也就是:
For example, to use the features specifically ed for Windows 2000 in the header files, you need to explicitly define _WIN32_WINNT as 0x0500 or greater. You can define the symbols using the #define statement in each source file, or by specifying the /D_WIN32_WINNT=0x0500 compiler option supported by Visual C++.
这一行是什么意思?
#include "winuser.h"
int i=IDC_HAND;还是不行