Skip to content

Latest commit

 

History

History
158 lines (114 loc) · 4.96 KB

nf-tom-itextrange-endof.md

File metadata and controls

158 lines (114 loc) · 4.96 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:tom.ITextRange.EndOf
ITextRange::EndOf (tom.h)
Moves this range's ends to the end of the last overlapping Unit in the range.
EndOf
EndOf method [Windows Controls]
EndOf method [Windows Controls]
ITextRange interface
ITextRange interface [Windows Controls]
EndOf method
ITextRange.EndOf
ITextRange::EndOf
_win32_ITextRange_EndOf
_win32_ITextRange_EndOf_cpp
controls.ITextRange_EndOf
controls._win32_ITextRange_EndOf
tom/ITextRange::EndOf
controls\ITextRange_EndOf.htm
Controls
VS|Controls|~\controls\richedit\textobjectmodel\textobjectmodelreference\textobjectmodelinterfaces\endof.htm
12/05/2018
EndOf, EndOf method [Windows Controls], EndOf method [Windows Controls],ITextRange interface, ITextRange interface [Windows Controls],EndOf method, ITextRange.EndOf, ITextRange::EndOf, _win32_ITextRange_EndOf, _win32_ITextRange_EndOf_cpp, controls.ITextRange_EndOf, controls._win32_ITextRange_EndOf, tom/ITextRange::EndOf
tom.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Msftedit.dll
Windows
19H1
ITextRange::EndOf
tom/ITextRange::EndOf
c++
APIRef
kbSyntax
COM
Msftedit.dll
ITextRange.EndOf

ITextRange::EndOf

-description

Moves this range's ends to the end of the last overlapping Unit in the range.

-parameters

-param Unit

Type: long

Unit to use. Default value: tomWord. For a list of the other Unit values, see the discussion under ITextRange.

-param Extend

Type: long

Indicator of how the shifting of the range ends is to proceed. It can be one of the following.

0 or tomMove Collapses a nondegenerate range to the End of the original range by moving the insertion point. This is the default.
1 (or tomExtend) Moves End to the end of the overlapping Unit. Does not move Start.

-param pDelta

Type: long*

The count of characters that End is moved past. The value of the pointer can be null. On return, the value of pDelta is the number of characters the insertion point or End is moved plus 1 if a collapse occurs to the entry End. If the range includes the final CR (carriage return) (at the end of the story) and Extend = tomMove, then pDelta is set to –1, to indicate that the collapse occurred before the end of the range (because an insertion point cannot exist beyond the final CR).

-returns

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 code Description
E_NOTIMPL
Unit is not supported.
S_FALSE
Failure for some other reason.

-remarks

For comparison, the ITextRange::StartOf method moves the range ends to the beginning of the first overlapping Unit in the range. Note, the ITextRange::StartOf and ITextRange::EndOf methods differ from the HomeKey and EndKey methods in that the latter extend from the active end, whereas ITextRange::StartOf extends from Start and ITextRange::EndOf extends from End. If the range is an insertion point on a boundary between Units, ITextRange::EndOf does not change End. In particular, calling ITextRange::EndOf (tomCharacter, *, *) does not change End except for an insertion point at the beginning of a story.

-see-also

Conceptual

EndKey

HomeKey

ITextRange

Reference

StartOf

Text Object Model