BOOL GetCursorPos( LPPOINT lpPoint // cursor position );
GetCursorPos The GetCursorPos function retrieves the cursor's position, in screen coordinates. BOOL GetCursorPos( LPPOINT lpPoint // cursor position ); Parameters lpPoint [out] Pointer to a POINT structure that receives the screen coordinates of the cursor. Return Values If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.Res The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor. The calling process must have WINSTA_READATTRIBUTES access to the window station
GetCaretPos(LPPOINT lpPoint ); 得到输入焦点的客户区坐标. LPtoDP(HDC hdc, // handle to device context LPPOINT lpPoints, // array of points int nCount // count of points in array ); 转换成屏幕坐标. 可能是这样吧.
LPPOINT lpPoint // cursor position
);
The GetCursorPos function retrieves the cursor's position, in screen coordinates. BOOL GetCursorPos(
LPPOINT lpPoint // cursor position
);
Parameters
lpPoint
[out] Pointer to a POINT structure that receives the screen coordinates of the cursor.
Return Values
If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.Res
The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor. The calling process must have WINSTA_READATTRIBUTES access to the window station
LPtoDP(HDC hdc, // handle to device context
LPPOINT lpPoints, // array of points
int nCount // count of points in array
);
转换成屏幕坐标.
可能是这样吧.