Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem adding cursor to project

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hello,
I am trying to add a cursor to my project.
I have added it to the resources, and it is in my .rc file. When I add the "LoadCursor(IDC_HAND)" function, I get a build error saying "IDC_HAND" is an undeclared identifier. IDC_HAND is the ID of the cursor that I added.
Can anyone explain what I am doing wrong?

Thanks
 
Ok, I got it to build by adding the cursor ID to the resource.h file, but I now get a null handle when I call the function.

//code
m_hHand = AfxGetApp()->LoadCursor(IDC_HAND);
VERIFY(m_hHand); //I Crash here
//code
 
make sure the id IDC_HAND really stands for a cursor. You can add as many ids as you like, but if nothing stands for them any LoadXX call will fail.

------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top