ITextRange2::GetSubrange method
Retrieves a subrange in a range.
Syntax
HRESULT GetSubrange( [in] long iSubrange, [out] long *pcpFirst, [out] long *pcpLim );
Parameters
- iSubrange [in]
-
Type: long
The subrange index.
- pcpFirst [out]
-
Type: long*
The character position for the start of the subrange.
- pcpLim [out]
-
Type: long*
The character position for the end of the subrange.
Return value
Type: HRESULT
If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.
Remarks
Subranges are selected as follows.
| iSubrange value | Subrange |
|---|---|
| Equals zero | Gets the current active subrange. |
| Greater than zero | Gets the subrange at the index specified by iSubrange, in the order in which the subranges were added. This requires extra calculation. |
| Less than zero | Gets the subrange at the index specified by iSubrange, in increasing character position order. |
See ITextRange2::GetCount for the count of subranges not including the active subrange.
Requirements
|
Minimum supported client | Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Header |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/27/2012
