Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sets the text selection flags.
HRESULT SetFlags(
long Flags
);
Flags
Type: long
New flag values. It can be any combination of the following.
Selection flag | Value | Meaning |
---|---|---|
tomSelStartActive | 1 | Start end is active. |
tomSelAtEOL | 2 | For degenerate selections, the ambiguous character position corresponding to both the beginning of a line and the end of the preceding line should have the caret displayed at the end of the preceding line. |
tomSelOvertype | 4 | Insert/Overtype mode is set to overtype. |
tomSelActive | 8 | Selection is active. |
tomSelReplace | 16 | Typing and pasting replaces selection. |
Each of the table values is binary. Thus, if any value is not set, the text selection has the opposite property.
Type: HRESULT
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:
selection.Flags = tomSelStartActive + tomSelAtEOL
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.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | tom.h |
DLL | Msftedit.dll |
Conceptual
Reference
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register now