BOOL SetCaretPos(X, Y) | |||||
int X; | /* horizontal position | */ | |||
int Y; | /* vertical position | */ |
This function moves the caret to the position given by the coordinates specified by the X and Y parameters. If the window owning the cursor is was created with the CS_OWNDC class style, then the X and Y coordinates are subject to the mapping mode specified in the own dc associated with that window.
The SetCaretPos function moves the caret only if it is owned by a window in the current thread. SetCaretPos moves the caret whether or not the caret is hidden.
X
Specifies the new x-coordinate of the caret.
Y
Specifies the new y-coordinate of the caret.
TRUE is returned for success, FALSE for failure.
The caret is a shared resource. A window should not move the caret if it does not own the caret.
GetCaretPos, ShowCaret, HideCaret