Windows Dev Center

ITextRange::MoveStart method

Moves the start postion of the range the specified number of units in the specified direction.

Syntax


HRESULT MoveStart(
   long Unit,
   long Count,
   long *pDelta
);

Parameters

Unit

Type: long

Unit used in the move. The default value is tomCharacter. For a list of the other Unit values, see the discussion under ITextRange.

Count

Type: long

Number of units to move. The default value is 1. If Count is greater than zero, motion is forward—toward the end of the story—and if Count is less than zero, motion is backward—toward the beginning. If Count is zero, the start position is unchanged.

pDelta

Type: long*

The actual number of units that the end is moved. The value can be null.

Return value

Type: HRESULT

The method returns an HRESULT value. If the method succeeds, it returns S_OK. If the method fails, it returns one of the following error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_NOTIMPL

Unit is not supported.

S_FALSE

Failure for some other reason.

 

Remarks

If the new start follows the old end, the new end is set equal to the new start.

The motion described by ITextRange::MoveStart is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right.

For more information, see ITextRange and ITextRange::Move.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextRange
Move
MoveEnd
Conceptual
Text Object Model

 

 

Community Additions

ADD
Show:
© 2015 Microsoft