[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

compiler error C2065: 'IDC_HAND' : undeclared identifier

Posted on 2004-08-26
5
Medium Priority
?
2,242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

656 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