Restoring the Cursor

This is a discussion on Restoring the Cursor within the Windows Programming forums, part of the Platform Specific Boards category; Hi all,
Can somebody suggest me, how after having used the SetSystemCursor() to change a default cursor, can I get ...

not sure...

The funny thing about LoadCursor is that it actually acquires the 'handle' of the cursor. So if you manage to change the cursor itself using SetSystemCursor(), then there is no way you can get it back.
Infact i tried a new technique by using GetIconInfo() to capture entire information of the cursor and then restoring it back using SetSystemcursor.
But now I face a new problem.
It cannot restore animated cursors

Yes, I did use CopyCursor, as it is stated in MSDN that SetSystemCursor deletes the handle of the source. But even that didn't work (surprisingly!). That is how I came to this conclusion that copycursor only takes a copy of the handle (something like taking a copy of a pointer and not the actualy data).

hmm...it works fine. Will try it out in my code... although my method also gives the same results.
But there was something I was really hoping that this code would be able do....to restore an animated cursor, but it doesn't
I use the 'Variations (system scheme)' theme of cursors and noticed that the animations in the arrow cursor was not restored.

Do not use the CopyCursor function for animated cursors. Instead, use the CopyImage function.

But that's not all.......On my Win2K box, I could not load an animated cursor using the OCR_xxx constants. Didn't matter if I used LoadCursor() or LoadImage().

It looks like the only way to get a handle to an animated cursor is to load it from file. You can get the path to the the system cursor files by looking in the registry under: "HKCU\Control Panel\Cursors\"