Because of limited screen space, Windows CE-based devices use either the CBS_DROPDOWN or CBS_DROPDOWNLIST style rather than the CBS_SIMPLE style that is popular on Windows-based desktop platforms. In the CBS_SIMPLE style, the list box is always visible and the current selection is displayed in the edit control. In the the CBS_DROPDOWN or CBS_DROPDOWNLIST styles, the list box is not displayed until the user selects an icon next to the edit control, which conserves space on the screen. The difference between the two styles is that the CBS_DROPDOWNLIST style has a static text field that always displays the current selection instead of having an edit control.
Window CE does not support owner-drawn combo boxes.
Note If you specify the CBS_EX_CONSTSTRINGDATA style when the application inserts a string into the list part of a combo box, the combo box stores the pointer passed to it by the application rather than copying the string. This saves RAM resources when you have a large table of strings in ROM that you want to insert into a combo box.
All combo boxes in Windows CE have the LBS_HASSTRINGS style by default.
Combo box styles supported by Windows CE are described in the following table.
Style | Description |
---|---|
CBS_AUTOHSCROLL | Automatically scrolls the text in an edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed. |
CBS_DISABLENOSCROLL | Shows a disabled vertical scroll bar in the list box when the box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items. |
CBS_DROPDOWN | Displays only the edit control by default. The user can display the list box by selecting an icon next to the edit control. |
CBS_DROPDOWNLIST | Displays a static text field that displays the current selection in the list box. |
CBS_LOWERCASE | Converts any uppercase characters typed into the edit control of a combo box to lowercase. |
CBS_NOINTEGRALHEIGHT | Specifies that the combo box will be exactly the size specified by the application when it created the combo box. Usually, Windows sizes a combo box so that it does not display partial items. |
CBS_OEMCONVERT | Converts text typed in the combo box edit control from the Windows character set to the OEM character set and then back to the Windows set. This style is most useful for combo boxes that contain file names. It applies only to combo boxes created with the CBS_DROPDOWN style. |
CBS_SORT | Automatically sorts strings typed into the list box. |
CBS_UPPERCASE | Converts any lowercase characters typed into the edit control of a combo box to uppercase. |
WS_TABSTOP | Turns control into a tab stop, which allows the user to select the control by tabbing through the controls in a dialog box. |
Windows CE does not support the CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE styles for combo boxes.