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
Deletes the undo stack, discards rich-text formatting, replaces all text.
ST_KEEPUNDO
Keeps the undo stack.
ST_SELECTION
Replaces selection and keeps rich-text formatting.
ST_NEWCHARS
Act as if new characters are being entered.
ST_UNICODE
The text is UTF-16 (the WCHAR data type).

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

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

See also

EM_SETTEXTEX