Combination-Box Styles

The following table shows the combination-box styles:

┌────────────────────┬────────────────────────────────────────┐
│Style Name          │Description                             │
├────────────────────┼────────────────────────────────────────┤
│CBS_SIMPLE          │Creates a simple combination box that   │
│                    │always displays its list box. The user  │
│                    │can enter and edit text in the entry    │
│                    │field or choose items from the list box.│
├────────────────────┼────────────────────────────────────────┤
│CBS_DROPDOWN        │Creates a drop-down combination box that│
│                    │displays its list box only if the user  │
│                    │clicks the drop-down icon at the right  │
│                    │end of the entry field. The             │
│                    │combination-box control hides the list  │
│                    │box when the user clicks the icon a     │
│                    │second time. In a drop-down combination │
│                    │box, the user can enter and edit text in│
│                    │the entry field or choose items from the│
│                    │list box.                               │
├────────────────────┼────────────────────────────────────────┤
│CBS_DROPDOWNLIST    │Creates a drop-down-list combination box│
│                    │that is similar to the drop-down        │
│                    │combination box, except that the user   │
│                    │can choose items only from the list box.│
│                    │The user cannot enter or edit text in   │
│                    │the entry field.                        │
└────────────────────┴────────────────────────────────────────┘

For combination boxes that have the CBS_DROPDOWN or CBS_DROPDOWNLIST styles, an application can display the list by using the CBM_SHOWLIST message.

An application can determine whether the list is already showing by using the CBM_ISLISTSHOWING message.

Applications also can use any of the entry-field (EM_) and list-box (LM_) messages with combination boxes. Entry-field messages affect the entry field; list-box messages affect the list box. For example, an application can use the LM_INSERTITEM message to insert items into the list box.


[Back: About Combination-Box Controls]
[Next: Combination-Box Notification Codes]