Moves the insertion point position to the position of a display pointer.
HRESULT MoveCaretToPointer( IDisplayPointer *pDispPointer, BOOL fScrollIntoView, CARET_DIRECTION eDir );
- [in] A pointer to an IDisplayPointer interface that specifies the display pointer to which to move the insertion point.
- [in] A BOOL value that specifies TRUE if the insertion point should scroll into view during the move, or FALSE otherwise.
- [in] A CARET_DIRECTION enumeration value that indicates which direction is the forward direction of the insertion point after it's placed.
Returns S_OK if successful, or an error value otherwise.
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.