Reputation: 11
Windows supports animated mouse cursors and I want to take a snapshot of all mouse cursor frames live, that is: I want to know exactly which frame of the cursor is being displayed to the user at the moment x (milliseconds is also important). It is essential that the frame index is extracted correctly. I use the DrawIconEx
function for this purpose.
What exists to figure out exactly which frame is being displayed right now?
Upvotes: 1
Views: 202
Reputation: 256711
I am going to say that this is not possible.
Your best alternative is to what programs like AutoCAD, Photoshop, and many games do:
Draw the cursor yourself
ShowCursor(False);
GetCursorPos(point)
Your other alternative is to constantly replace the cursor in your app with a custom cursor - with only one image in it:
cursorHandle := LoadImage(0, IDC_WAIT, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE or LR_SHARED);
Screen.Cursors[crWait] := cursorHandle;
Now you know exactly what image the cursor is currently showing, because you loaded it.
Upvotes: 1