SETTEXTEX structure (richedit.h)

Specifies which code page (if any) to use in setting text, whether the text replaces all the text in the control or just the selection, and whether the undo state is to be preserved. This structure is used with the EM_SETTEXTEX message.

Syntax

typedef struct _settextex {
  DWORD flags;
  UINT  codepage;
} SETTEXTEX;

Members

flags

Type: DWORD

Option flags. It can be any reasonable combination of the following flags.

Value Meaning
ST_DEFAULT
0x00
Deletes the undo stack, discards rich-text formatting, replaces all text.
ST_KEEPUNDO
0x01
Keeps the undo stack.
ST_SELECTION
0x02
Replaces selection and keeps rich-text formatting.
ST_NEWCHARS
0x04
Act as if new characters are being entered.
ST_UNICODE
0x08
The text is UTF-16 (the WCHAR data type).
ST_PLACEHOLDERTEXT
0x10
Placeholder text that is visible only when focus is not on the RichEdit control and the control does not contain any user-specified text.
ST_PLAINTEXTONLY
0x20
RichEdit control supports plain text only.

codepage

Type: UINT

The code page used to translate the text to Unicode. If codepage is 1200 (Unicode code page), no translation is done. If codepage is CP_ACP, the system code page is used.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header richedit.h

See also

EM_SETTEXTEX