HCURSOR to MouseCursor


#1

Dear Forum,

 

Could you please recommend the best way to convert HCURSOR to MouseCursor?

I'd like to have native Drag and Drop cursors on Windows. I get HCURSOR from ole32.dll, and then create DC, get bitmaps, then use GetIconInfoEx to get hotspot, etc. Finally create MouseCursor from Image. Definitely long and exhausting way, when MouseCursor uses HCURSOR for standard cursor shapes, there should be more elegant shortcut for my paticular case. If you know one - please share!

This question can also be a feature request (if possible) it would be nice to have either protected methods and members, or access to platform specific handles.

 

I appreciate any ideas,

Thank you,

Victor

 


#2

Doesn't sound like a realistic request.. Why not just create your cursor from the image you want, which is something you can already do, and which is cross-platform?


#3

Jules, thank you for very fast reply,

 

I'd like to have standard windows Drag and Drop cursors. They can vary from one windows version to another, or one style to another maybe, that's why I get them from ole32.dll dynamically, using LoadCursor etc.

 

Victor


#4

Well, it's a bit too platform-specific to warrant going into the library, I think. But if you can think of a more generic way to do what it is that you're after, then let us know.


#5

Isn’t that what you get if you make a MouseCursor with one of the StandardCursorType constants?

--
Roeland


#6

Roeland,

Unfortunately no..

Victor