SetCaretPos

2.x

  void SetCaretPos(x, y)    
  int x; /* horizontal position, */  
  int y; /* vertical position, */  

The SetCaretPos function sets the position of the caret.

Parameters

x

Specifies the new x-coordinate, in client coordinates, of the caret.

y

Specifies the new y-coordinate, in client coordinates, of the caret.

Return Value

This function does not return a value.

Comments

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.

The caret is a shared resource. A window should not move the caret if it does not own the caret.

See Also

GetCaretPos