To retrieve the cursor's position, in screen coordinates. The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor.
BOOL GetCursorPos( POINT * lpPoint )
If the function succeeds, the return value is TRUE.
EX1
void GetCursorPos_ex1() { POINT pt; bool bRet = GetCursorPos(&pt); printf("Current cursor position (%d, %d)\n", pt.x, pt.y); }
origin.h