2014-04-01 41 views

回答

3

首先,你需要使用GetCursorInfo()获取光标信息:

CURSORINFO cinfo; 
ZeroMemory(&cinfo, sizeof(CURSORINFO)); 
cinfo.cbSize = sizeof(CURSORINFO); 
GetCursorInfo(&cinfo); 

然后你就可以使用DrawIconEx()绘制到您的截图位图:

DrawIconEx(hdcMemory, cinfo.ptScreenPos.x, cinfo.ptScreenPos.y, cinfo.hCursor, 0, 0, 0, NULL, DI_NORMAL);