Save current mouse cursor to file
Posted: Wed Jan 29, 2014 10:44 am
Greetings.
I'd like to capture the current mouse cursor and save it as a bitmap file. I'm struggling with this for about 4 hours now and I can't seem to make any progress. My code for now:
I'm not sure I'm on the right track, especially the last 2 lines with GetObject_() and CopyIcon_(). I believe the solution is in CursorInfo\hCursor, the handle of the current cursor. Does anyone have some ideas to make this happen?
Thanks!
I'd like to capture the current mouse cursor and save it as a bitmap file. I'm struggling with this for about 4 hours now and I can't seem to make any progress. My code for now:
Code: Select all
Global CursorInfo.CURSORINFO
Global gIconInfo.IconInfo
Global GetObjectBitmap.BITMAP
Global CopyIconResult, GetCursorInfoResult, GetIconInfoResult, GetObjectResult
CursorInfo\cbSize = SizeOf(CURSORINFO)
GetCursorInfoResult = GetCursorInfo_(CursorInfo)
GetIconInfoResult = GetIconInfo_(CursorInfo\hCursor, gIconInfo)
GetObjectResult = GetObject_(gIconInfo\hbmMask, SizeOf(BITMAP), GetObjectBitmap)
CopyIconResult = CopyIcon_(CursorInfo\hCursor)
Thanks!
