ITextRange2::GetCount method (tom.h)
Gets the count of subranges, including the active subrange in the current range.
Syntax
HRESULT GetCount(
[out, retval] long *pCount
);
Parameters
[out, retval] pCount
Type: long*
The count of subranges not including the active one.
Return value
Type: HRESULT
If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.
Remarks
If you select a range with no or one character, the count will be 1. But if you select a word and then move to a different location, and select a second word not touching the first, then the count is 2.
See ITextRange2::AddSubrange to add subranges programmatically.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | tom.h |
DLL | Msftedit.dll |