GetCaretPos function (winuser.h)
Copies the caret's position to the specified POINT structure.
BOOL GetCaretPos(
[out] LPPOINT lpPoint
);
[out] lpPoint
Type: LPPOINT
A pointer to the POINT structure that is to receive the client coordinates of the caret.
Type: BOOL
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.
This 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.Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-caret-l1-1-0 (introduced in Windows 8) |
Conceptual
Other Resources
Reference