A combo box is a control that combines a list box with an edit control. Selecting an item in the list box displays the selected text in the edit control. If the combo box style accepts keyboard input, typing characters into the edit control highlights the first list box item that matches the characters typed. A combo box can appear either in a dialog box or on the command bar.
COMBOBOX id, x, y, width, height [[, style [[, extended-style]]]]
Here, id is the value that identifies the combo box. The upper-left corner of the control is positioned at coordinates x, y, and its dimension is determined by the values width and height. Style and extended-style determine the appearance of the combo box. Because of limited screen space, Windows CE–based devices use either the CBS_DROPDOWN or CBS_DROPDOWNLIST style rather than the CBS_SIMPLE style 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 CBS_DROPDOWN or CBS_DROPDOWNLIST styles, the list box is not displayed until a user selects an icon next to the edit control, which conserves screen space. 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.
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 when you have a large table of strings in ROM that you want to insert into a combo box.
All list boxes in Windows CE have the LBS_HASSTRINGS style by default. Windows CE does not support owner-drawn combo boxes. For a complete listing of supported styles, see Window and Control Styles.
To create a command bar combo box and insert it into a command bar, use the CommandBar_InsertComboBox function. The following screen shot shows a combo box.