ITextHost::TxSetCaretPos method (textserv.h)

Moves the caret position to the specified coordinates in the text host window.

Syntax

BOOL TxSetCaretPos(
  [in] INT x,
  [in] INT y
);

Parameters

[in] x

Type: INT

Horizontal position (in client coordinates).

[in] y

Type: INT

Vertical position (in client coordinates).

Return value

Type: BOOL

Return TRUE if the method succeeds.

Return FALSE if the method fails.

Remarks

This method is only valid when the control is in-place active; calls while the control is inactive may fail.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header textserv.h
DLL Msftedit.dll

See also

ITextHost

Windowless Rich Edit Controls Overview