Solved

compiler error C2065: 'IDC_HAND' : undeclared identifier

Posted on 2004-08-26
5
2,204 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 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

691 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