MoveCaretToPointer method
Moves the insertion point position to the position of a display pointer.
Syntax
HRESULT retVal = object.MoveCaretToPointer(pDispPointer, fScrollIntoView, eDir);
Parameters
pDispPointer [in]
Type: IDisplayPointerA pointer to an IDisplayPointer interface that specifies the display pointer to which to move the insertion point.
fScrollIntoView [in]
Type: BOOLA BOOL value that specifies TRUE if the insertion point should scroll into view during the move, or FALSE otherwise.
eDir [in]
Type: CARET_DIRECTIONA CARET_DIRECTION enumeration value that indicates 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.