ITextRange2 interface

The ITextRange2 interface is derived from ITextRange, and its objects are powerful editing and data-binding tools that enable a program to select text in a story and then examine or change that text.

When to implement

Applications typically do not implement the ITextRange2 interface. Microsoft text solutions, such as rich edit controls, implement ITextRange2 as part of their TOM implementations.

When to use

Applications can retrieve an ITextRange2 pointer from a rich edit control by calling the ITextDocument2::Range2 method.

Members

The ITextRange2 interface inherits from ITextSelection. ITextRange2 also has these types of members:

Methods

The ITextRange2 interface has these methods.

MethodDescription
AddSubrange

Adds a subrange to this range.

BuildUpMath

Converts the linear-format math in a range to a built-up form, or modifies the current built-up form.

DeleteSubrange

Deletes a subrange from a range.

Find

Searchs for math inline functions in text as specified by a source range.

GetCch

Gets the count of characters in a range.

GetCells

Gets a cells object with the parameters of cells in the currently selected table row or column.

GetChar2

Gets the character at the specified offset from the end of this range.

GetColumn

Gets the column properties for the currently selected column.

GetCount

Gets the count of subranges, including the active subrange in the current range.

GetDropCap

Gets the drop-cap parameters of the paragraph that contains this range.

GetDuplicate2

Gets a duplicate of a range object.

GetFont2

Gets an ITextFont2 object with the character attributes of the current range.

GetFormattedText2

Gets an ITextRange2 object with the current range's formatted text.

GetGravity

Gets the gravity of this range.

GetInlineObject

Gets the properties of the inline object at the range active end.

GetMathFunctionType

Retrieves the math function type associated with the specified math function name.

GetPara2

Gets an ITextPara2 object with the paragraph attributes of a range.

GetProperty

Gets the value of a property.

GetRect

Retrieves a rectangle of the specified type for the current range.

GetRow

Gets the row properties in the currently selected row.

GetStartPara

Gets the character position of the start of the paragraph that contains the range's start character position.

GetSubrange

Retrieves a subrange in a range.

GetTable

Gets the table properties in the currently selected table.

GetText2

Gets the text in this range according to the specified conversion flags.

GetURL

Returns the URL text associated with a range.

HexToUnicode

Converts and replaces the hexadecimal number at the end of this range to a Unicode character.

InsertImage

Inserts an image into this range.

InsertTable

Inserts a table in a range.

Linearize

Translates the built-up math, ruby, and other inline objects in this range to linearized form.

SetActiveSubrange

Makes the specified subrange the active subrange of this range.

SetDropCap

Sets the drop-cap parameters for the paragraph that contains the current range.

SetFont2

Sets the character formatting attributes of the range.

SetFormattedText2

Sets the text of this range to the formatted text of the specified range.

SetGravity

Sets the gravity of this range.

SetInlineObject

Sets or inserts the properties of an inline object for a degenerate range.

SetPara2

Sets the paragraph format attributes of a range.

SetProperty

Sets the value of the specified property.

SetText2

Sets the text of this range.

SetURL

Sets the text in this range to that of the specified URL.

UnicodeToHex

Converts the Unicode character(s) preceding the start position of this text range to a hexadecimal number, and selects it.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.