Jump to content
  • Advertisement
Sign in to follow this  
Jacob Jingle

Win 7 Cursors(C++)

This topic is 2714 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

What is the standard way for loading Windows 7 cursors in a program?

I'm looking for a way to load the standard listview header resize cursor <-|->

Example code greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement

You can use LoadCursor to easily get some standard cursors.

Yeah, that doesn't seem to offer what I want. :(


LoadCursor(NULL, IDC_SIZEWE) should get you a cursor for right-left resizing.

No, what I want is the cursor you get when you adjust a header control in windows 7. It's like right-left resizing but with a line down the center.

Start -> Computer -> Drive (Cursor you get when go between Name/Date Modified/Type/Size in details view)

Share this post


Link to post
Share on other sites
I looked for that one a while back - I don't think it is actually exposed by the API so unless you can find out where office is loading it from, I don't think it's usable.

Share this post


Link to post
Share on other sites

I looked for that one a while back - I don't think it is actually exposed by the API so unless you can find out where office is loading it from, I don't think it's usable.

It's weird that Microsoft wouldn't provide a way to further tie code to their OS...

...The world just doesn't make sense anymore. :wacko:

Share this post


Link to post
Share on other sites

[quote name='Aardvajk' timestamp='1294740049' post='4757179']
I looked for that one a while back - I don't think it is actually exposed by the API so unless you can find out where office is loading it from, I don't think it's usable.


It's weird that Microsoft wouldn't provide a way to further tie code to their OS...
[/quote]

Actually, if it's not a regular cursor, then it's probably a resource that was included into the program, and then loaded the resource as the cursor.You would go about doing this by the #define preprocessor directive in the resource.h file like this:



#define IDC_FAVCURSOR 3001



, and then initialized in the main.rc file like this:


IDC_FAVCURSOR /* or whatever you defined it as */ CURSOR "Res\\favcursor.cur" /* the filename */


After you do that, you can load it into the LoadCursor function like any other windows cursor.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!