• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Q: Loading Custom Cursors in MS Visual C++

This topic is 6758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
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......

Share this post


Link to post
Share on other sites

  • Advertisement