MoveCaretToPointerEx method

Moves the insertion point position to the position of a display pointer, and makes the insertion point visible or invisible.

Syntax

HRESULT retVal = object.MoveCaretToPointerEx(pDispPointer, fVisible, fScrollIntoView, eDir);

Parameters

  • pDispPointer [in]
    Type: IDisplayPointer

    A pointer to an IDisplayPointer interface that specifies the display pointer to which to move the insertion point.

  • fVisible [in]
    Type: BOOL

    A BOOL that specifies TRUE if the insertion point is visible after the move, or FALSE otherwise.

  • fScrollIntoView [in]
    Type: BOOL

    A BOOL that specifies TRUE if the insertion point should scroll into view during the move, or FALSE otherwise.

  • eDir [in]
    Type: CARET_DIRECTION

    A CARET_DIRECTION enumeration that specifies which direction is the forward direction of the insertion point after it's placed.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

In documents that have mixed languages and text flow (left to right and right to left) on the same line, the direction of insertion point movement can be ambiguous. The eDir parameter resolves this ambiguity.

For example, the line, "This is CIBARA[c] text." contains an insertion point at [c]. CIBARA is in Arabic (which reads from right to left), so the position of the insertion point can be interpreted in two ways. It might be at the beginning of CIBARA; in which case, the forward direction of the insertion point is to the left. It might be at the end of CIBARA; in which case, the forward direction is to the right.