I want to draw the default animated cursor (hourglass in XP, circle since vista) on a form.
Theoretically, this is no problem using LoadCursor(NULL, IDC_WAIT) and DrawIconEx with the special parameter istepIfAniCur.
My problem is: How to determine the number of frames of such a system cursor (when to restart?).
The ICONINFOEX structure does not unveil this information.
I think the ICONDIR structure - the first bytes in the raw memory dump of the resource - does contain the number of images. But: How to get the raw resource data for a system / stock object.
FindResource(NULL, MAKEINTRESOURCE(IDC_WAIT), RT_CURSOR) does not help.
I hope, some MFC/Win32-Resource expert has some idea. Thanks in advance !
For all which are wondering why I sometimes refer to icons: In Win32, internally a cursor is only a special kind of icon. A icon resource (or file) contains multiple images, each for a distinct resolution/color depth. An animated cursor contains multiple "frames" which must be displayed cyclically ("thumb cinema").
PS: Why i would do this ? We have a special control displaying tasks (nested) and progresses, and we like to indicate background activity. Of course a marquee progress control could also serve as a "wait indicator", but this simple problem is just challenging me ;-)