CTextRange2.SetEndmethod
Sets the end position of the range.
Syntax
FUNCTION SetEnd (BYVAL cpLim AS LONG) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
cpLim | The new end position. |
Return value
The method returns an HRESULT value. If the method succeeds, it returns S_OK. If the method fails, it returns S_FALSE.
Description
Sets the end position of the range.
Remarks
If the new end position is less than the start position, this method also sets the start position to cp; that is, the range becomes an insertion point.
If this range is actually the selection, the end position becomes the active end and, if the display is not frozen, it is scrolled into view.
SetStart sets the range's start position and SetRange sets both range ends simultaneously.
Reference
- Defined in AfxNova/CTextRange2.inc:281
- Documented in Windows/WIndows Controls/RichEdit/CTextRange2 Class.md
- Topic: CTextRange2 Class