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.
Win 7 Cursors(C++)
You can use LoadCursor to easily get some standard cursors. LoadCursor(NULL, IDC_SIZEWE) should get you a cursor for right-left resizing.
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)
Do you mean like LoadIcon(hDC, IDC_SIZEALL) ?
Or like LoadIcon(hDC, IDC_CROSS) ?
No, neither.
Here it is in Office, but Windows 7 uses it too.
cursor
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.
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.
'Aardvajk' said:
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…
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement