title: Capture which step of an animated system cursor is being shown on Windows
body: <p>I want to capture as a bitmap the system cursor on Windows OSes as accurately as possible.
  The provided API for this is to my knowledge GetCursorInfo, DrawIconEx.</p>
  
  <p>The simple chain of actions is:</p>
  
  <ul>
  <li>Get cursor by using GetCursorInfo</li>
  <li>Paint the cursor in a memory DC by using DrawIconEx.</li>
  </ul>
  
  <p>Here is how the code looks roughly.</p>
  
  <pre><code>CURSORINFO  CursorInfo;
  
  (VOID)memset(&amp;CursorInfo, 0, sizeof(CursorInfo));
  CursorInfo.cbSize = sizeof(CursorInfo);
  
  if (GetCursorInfo(&amp;CursorInfo) &amp;&amp;
      CursorInfo.hCursor)
  {
      // ... create here the memory DC, memory bitmap
  
      boError |= !DrawIconEx(hCursorDC,   // device context
          0,              // xLeft
          0,              // yTop
          CursorInfo.hCursor,     // cursor handle
          0,              // width, use system default
          0,              // height, use system default
          0,              // step of animated cursor !!!!!!!!!
          NULL,               // flicker free brush, don't use it now
          DI_MASK | DI_DEFAULTSIZE);  // flags
  
      // ... do whatever we want with the cursor in our memory DC
  }
  </code></pre>
  
  <p>Now, anyone knows how I could get which step of the animated cursor is being drawn (I need the value that can be then passed to the istepIfAniCur parameter of DrawIconEx...)? Currently the above code obviously always renders only the first step of an animated cursor.</p>
  
  <p>I suspect this can not be easily done, but it's worth asking anyway.</p>