Solved

compiler error C2065: 'IDC_HAND' : undeclared identifier

Posted on 2004-08-26
5
2,103 Views
Last Modified: 2008-01-09
I'm getting this error in LoadCursor(NULL, IDC_HAND); even tho <windows.h> is included, and
User32.lib is referenced.
What am I missing?
0
Comment
Question by:jd9288
5 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 11904557
This is pure Win API and no MFC?

windows.h has several ifdef cases. Depending on what is defined before it might not be included by the compiler.
When using MS studio you can right click on IDC_HAND and select "go to definition ...". If it is correctly included you will be brought to the line in windows.h else nothing happens. In that case you need to have a look at project settings.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11904653
You can do it manually:
#define IDC_HAND MAKEINTRESOURCE(32649)
0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 125 total points
ID: 11904704
Its defined in winuser.h

#if(WINVER >= 0x0500)
#define IDC_HAND            MAKEINTRESOURCE(32649)
#endif /* WINVER >= 0x0500 */

but available only for NT 5.0 and higher (W2k or WXP). If you have such a system you should set WINVER to 0x0500 in the project settings  (C++-Tab, Preprocessor Settings: add ,WINVER=0x0500)

Regards, Alex
0
 

Author Comment

by:jd9288
ID: 11904735
Setting WINVER actually worked!
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 11904903
Wow! You have been very fast. Three minutes to test, accept and give points.

Don't forget to set WINVER in Release Settings also.

Thank's for the points.

Regards, Alex

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now