CursorInfo
-
Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???
duta wrote:
How can I know what type of cursor do I have ( ex arrow, hand, wait)???
If it's a custom cursor, then you won't know what it is. For system predefined cursors, you MAY be able to compare the handle to the handle returned by LoadCursor() for predefined cursors. I'm not sure if those handles are always the same but it's easy enough to test :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???
A better question is, why do you want to do that? As Mark stated, it's gonna fall apart if someone sets up a custom cursor anyway, and even if that never happens you'd still be depending a good deal on what is essentially an implementation detail of how Windows loads common images... so unless this is a convenience thing (you need to record the current cursor for some reason and want to display a friendly name for it if possible), you're better off finding another way of maintaining state.
----
...the wind blows over it and it is gone, and its place remembers it no more...
-
Hi there i'm using GetCursorInfo in order to have the handle to the cursor. How can I know what type of cursor do I have ( ex arrow, hand, wait)???
The Bottom Line is that good programming practice dictates, that you keep track of what you do! That's called Programming!
Bram van Kampen
-
duta wrote:
How can I know what type of cursor do I have ( ex arrow, hand, wait)???
If it's a custom cursor, then you won't know what it is. For system predefined cursors, you MAY be able to compare the handle to the handle returned by LoadCursor() for predefined cursors. I'm not sure if those handles are always the same but it's easy enough to test :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Mark Salsbery wrote:
...but it's easy enough to test
Surely you jest!
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Mark Salsbery wrote:
...but it's easy enough to test
Surely you jest!
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
No. And don't call me surely :)
Mark Salsbery Microsoft MVP - Visual C++ :java: