Edit Controls

An edit control, which is also called a text box, is a rectangular window in which a user can type and edit text from the keyboard.

    

Edit control

Generally, you provide a label for an edit control by placing a static control with the appropriate text above or next to the edit control. However, if you do not have enough space to do this, you can include the label as the default text inside the edit control, enclosed between angle brackets, for example, <edit control label>.

An edit control is selected and receives the input focus when a user touches it with a stylus or presses the TAB key. After it is selected, the edit control displays its text, if any, and a flashing caret that indicates the insertion point. The user can then type text, move the insertion point, or select text to be moved or deleted by using the stylus or keys on the keyboard. An edit control can send notification messages to its parent window in the form of WM_COMMAND messages. A parent window can send messages to an edit control in a dialog box by calling the SendDlgItemMessage function.

Windows provides both single-line edit controls (SLEs), and multiline edit controls (MLEs). Edit controls belong to the EDIT window class.

Because Windows CE does not support rich edit controls, you cannot use edit control masks.