2014-04-01 83 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);