GetCaretPos function (winuser.h)
Copies the caret's position to the specified POINT structure.
BOOL GetCaretPos( [out] LPPOINT lpPoint );
A pointer to the POINT structure that is to receive the client coordinates of the caret.
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.
The caret position is always given in the client coordinates of the window that contains the caret.
DPI VirtualizationThis API does not participate in DPI virtualization. The returned values are interpreted as logical sizes in terms of the window in question. The calling thread is not taken into consideration.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|
|API set||ext-ms-win-ntuser-caret-l1-1-0 (introduced in Windows 8)|