Jump to content

  • Log In with Google      Sign In   
  • Create Account


Q: Loading Custom Cursors in MS Visual C++


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 24 October 1999 - 12:19 AM

I am having trouble loading custom cursors into my C++ app. I can get the standard cursors to load by calling:

SetCursor(LoadCursor(NULL, IDC_UPARROW));

...but I can't get the custom cursor I created in the resource editor to load.

My custom cursor is associated with the constant IDC_CURSOR4. It shows up in my cursor resources list but it no cursor is shown when I do the following call:

SetCursor( LoadCursor(NULL, IDC_CURSOR4));

I really appreciate any help you wizards can give me as I've poured through all my books and can't get it to work.

As a favor can you please email me your replies to:

Glenn_Whiting@cc.chiron.com

Thanks!


Sponsor:

#2 Kentamanos   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 October 1999 - 12:16 PM

The most obvious problem is that you need to specify the hInstance paramater on the LoadCursor call.

It's not good form to call functions without checking results too. You should make it 2 separate calls, checking the results of each.

------------------

-Kentamanos


#3 CJ   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 October 1999 - 12:19 AM

Ok, first of all, you should do what you already did

WndCls.hCursor = LoadCursor(NULL, IDC_WHATEVER_IT_IS_CALLED);

and in your resource file you should have

IDC_WHATEVER_IT_IS_CALLED ICON MyOwnDamnedFuckingGoodLooking.ico

ie. the filename.....

------------------
Dance with me......





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS