Help Center

CTextRange2.SetFlagsmethod

Sets the text selection flags.

Windowsmethoddocumented

Syntax

FUNCTION SetFlags (BYVAL Flags AS LONG) AS HRESULT

Parameters

NameDescription
FlagsFlag specifying the end to scroll into view. It can be one of the following.

Return value

The method returns S_OK.

To make sure that the start end is active and that the ambiguous character position is displayed at the end of the line, execute the following code:

The Flags property is useful because an ITextRange object can select itself. With SetFlags, you can change the active end from the default value of End, select the caret position for an ambiguous character position, or change the Insert/Overtype mode.

Description

Sets the text selection flags.

Each of the table values is binary. Thus, if any value is not set, the text selection has the opposite property.

Example

selection.Flags = tomSelStartActive + tomSelAtEOL

Reference

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