

For multiline edit controls without ES_AUTOHSCROLL, the text wraps to the next line when the user enters more text than can be displayed on a single line. For single-line edit controls without ES_AUTOHSCROLL, only the characters that fill the visible area of the control are accepted. If this style is not specified, the edit control cannot scroll horizontally. The ES_AUTOHSCROLL style tells the edit control to scroll the text horizontally, when necessary, as the user enters text. An application can also create a multiline edit control by using the ES_MULTILINE style. The default is a single-line edit control. There are two line styles for edit controls. The style values can establish the appearance of a single-line or multiline edit control align the text in the control and determine how, and even if, text appears in the edit control. For a table of edit control styles, see Edit Control Styles.Įvery edit control specifies a combination of style values that define the appearance and features of the edit control. If an application creates an edit control using the CreateWindow or CreateWindowEx function, however, it must specify these edit control styles. Most developers use tools to develop dialog boxes, and so may not need to specify edit control styles explicitly. Edit Control Types and StylesĪn individual edit control can have several styles at the same time. For information about common dialog boxes, see Common Dialog Box Library.

Many developers use the dialog boxes provided in the common dialog box library (Comdlg32.dll) to perform tasks that otherwise might require customized edit controls. For more information about combo boxes, see Combo Boxes. In a combo box, the edit control displays the current selection and the list box presents options a user can select. Edit controls belong to the EDIT window class.Ī combo box is a control that combines much of the functionality of an edit control and a list box. The system provides both single-line edit controls and multiline edit controls. Some messages can also be sent by using predefined macros. A parent window can send messages to an edit control in a dialog box by calling the SendDlgItemMessage function. For more information about messages from an edit control, see Edit Control Notification Messages. An edit control sends notification codes to its parent window in the form of WM_COMMAND messages. The user can then enter text, move the insertion point, or select text to be edited by using the keyboard or the mouse. When it is selected, an edit control displays a blinking caret that indicates the insertion point.

Rich edit controls support many features not available in system edit controls. For more information about Unicode and ANSI character sets, see Unicode and Character Sets. An edit control is a rectangular control window typically used in a dialog box to enable the user to enter and edit text.Įdit controls support both the Unicode character set in which characters are two bytes, and ANSI character sets in which characters are one byte.
