I’m currently working on camstudio_cl (here if interested).
The problem now is that I have to draw the cursor into a HDC.
This is how it is currently done (shorten):
HCURSOR hcur = GetCursor();
::DrawIconEx( hMemDC, xPoint.x, xPoint.y, hcur, 0, 0, 0, NULL, DI_NORMAL);
The problem is, this only draws a non animated Loading cursor, no matter which cursor is shown on screen.
But if you replace the HCURSOR with an defined HICON, in this case a hand, it works:
::DrawIconEx( hMemDC, xPoint.x, xPoint.y, LoadCursor(IDC_HAND), 0, 0, 0, NULL, DI_NORMAL);
So the problem seems to be the GetCursor() function, but it’s not null and I retrieve a handle.
I also tried to create my own cursor with GetIconInfo and the help of this thread, but I failed. It’s only a black square with some white dots in it.
I hope someone can help me with this.
Thanks to Raymond Chen I got it… just want to have this question answered as marked.
I had to get the global instead of the local cursor handle.