void SetCaretPos(X,Y)
This function moves the caret to the position given by logical coordinates specified by the X and Y parameters. Logical coordinates are relative to the client area of the window that owns them and are affected by the window's mapping mode, so the exact position in pixels depends on this mapping mode.
The SetCaretPos function moves the caret only if it is owned by a window in the current task. SetCaretPos moves the caret whether or not the caret is hidden.
Parameter | Type/Description |
X | int Specifies the new x-coordinate (in logical coordinates) of the caret. | |
Y | int Specifies the new y-coordinate (in logical coordinates) of the caret. |
None.
The caret is a shared resource. A window should not move the caret if it does not own the caret.