Property

Method

Event

 

 

GetCaretPos

Gets the current location of the input caret.

Syntax

    HRESULT GetCaretPos(
    long* pPos
    );

Parameters

pPos

[out, retval] Gets the current position of the input caret from the start of the document.

Return Values

0 (always)

Remarks

  1. Only used to ensure compatibility between the SetCaretPos method and WebEditor Control 2.x.
  2. The value acquired by the GetCaretPos method is used in the SetCaretPos method. The value itself has no importance.

Sample Codes

VBScript

    dim object
    Set object = document.editForm
    object = object.wec.GetCaretPos
    Msgbox object ' Returns the location of the caret.

See Also

 SetCaretPos