Bewerken

Delen via


Rich Edit Control Styles

The following window styles are unique to rich edit controls.

Constant Description
ES_DISABLENOSCROLL
Disables scroll bars instead of hiding them when they are not needed.
ES_EX_NOCALLOLEINIT
Prevents the control from calling the OleInitialize function when created. This window style is useful only in dialog templates because CreateWindowEx does not accept this style.
ES_NOIME
Disables the IME operation. This style is available for Asian language support only.
ES_NOOLEDRAGDROP
Disables support for drag-drop of OLE objects.
ES_SAVESEL
Preserves the selection when the control loses the focus. By default, the entire contents of the control are selected when it regains the focus.
ES_SELECTIONBAR
Adds space to the left margin where the cursor changes to a right-up arrow, allowing the user to select full lines of text.
ES_SELFIME
Directs the rich edit control to allow the application to handle all IME operations. This style is available for Asian language support only.
ES_SUNKEN
Displays the control with a sunken border style so that the rich edit control appears recessed into its parent window.
ES_VERTICAL
Draws text and objects in a vertical direction. This style is available for Asian-language support only.

Rich edit controls also support the following edit control styles.

Constant Description
ES_AUTOHSCROLL
Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.
ES_AUTOVSCROLL
Automatically scrolls text up one page when the user presses the ENTER key on the last line.
ES_CENTER
Centers text in a single-line or multiline edit control.
ES_LEFT
Left aligns text.
ES_MULTILINE
Designates a multiline edit control. The default is single-line edit control.
ES_NOHIDESEL
Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.
ES_NUMBER
Allows only digits to be entered into the edit control.
ES_PASSWORD
Displays an asterisk (*) for each character typed into the edit control. This style is valid only for single-line edit controls.
ES_READONLY
Prevents the user from typing or editing text in the edit control.
ES_RIGHT
Right aligns text in a single-line or multiline edit control.
ES_WANTRETURN
Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box's default push button. This style has no effect on a single-line edit control.

Rich edit controls do not support the following edit control styles.

Requirements

Requirement Value
Header
Winuser.h