Help Center

CTextRange2.GetEndmethod

Gets the end character position of the range.

Windowsmethoddocumented

Syntax

FUNCTION GetEnd () AS LONG

Return value

The end character position.

Description

Gets the end character position of the range.

Remarks

Although a pointer to a range remains valid when the text is edited, this is not the case for the character position. A character position is volatile; that is, it becomes invalid as soon as text is inserted or deleted before the character position. Be careful about using methods that return character position values, especially if the values are to be stored for any duration.

This method is similar to the GetStart method which gets the start character position of the range.

Reference

  • Defined in AfxNova/CTextRange2.inc:271
  • Documented in Windows/WIndows Controls/RichEdit/CTextRange2 Class.md
  • Topic: CTextRange2 Class