A dropdown combo box and a dropdown list combo box have a dropdown button, which the user clicks to show or hide the dropdown portion. When the dropdown button hides the dropdown portion, the selected item is accepted (SFTBOXN_SELENDOK), with all button styles. A simple combo box has no dropdown button.
The dropdown button is shown as disabled when the combo box control is disabled. A dropdown button that is drawn without Windows themes is also shown as disabled while the combo box has no items. Clicking the dropdown button of a combo box without items does not show the dropdown portion (a dropdown button inside the combo box sounds a beep).
SetDropDownButtonStyle defines the appearance of the dropdown button:
| Style | Description | Appearance |
|---|---|---|
| SFTBOX_DDBUTTON_DEFAULT | The dropdown button is located inside the combo box, at its right edge. It is drawn using the current Windows theme. If Windows themes are not used (see SetUseThemes), the button is drawn as a standard Windows scroll button. This is the default style. | ![]() |
| SFTBOX_DDBUTTON_WINCLASSIC | The dropdown button is located inside the combo box and is always drawn as a standard Windows scroll button, without Windows themes. | ![]() |
| SFTBOX_DDBUTTON_CLASSIC | The dropdown button is located inside the combo box and is drawn by the combo box, as a 3D button with an arrow, using the colorDropDown... members of the SFTBOX_COLORS structure (see SetCtlColors). | ![]() |
| SFTBOX_DDBUTTON_BUTTONHOVER | The dropdown button is a separate button, located outside of the combo box next to its right edge. It is only shown while the mouse cursor is over the combo box or while the combo box has the input focus. The combo box itself does not reserve any space for the button. The button uses the current Windows theme, if Windows themes are used. | ![]() |
| SFTBOX_DDBUTTON_BUTTONHOVERNT | Same as SFTBOX_DDBUTTON_BUTTONHOVER, but the button never uses Windows themes. | ![]() |
A dropdown button inside the combo box is as wide as a vertical scroll bar, or wider if required by its picture.
If the combo box is created with the WS_EX_LEFTSCROLLBAR extended window style and Windows displays vertical scroll bars on the left for this style, the dropdown button inside the combo box is located at its left edge.
By default, the dropdown button shows an arrow. SetDropDownButtonPicture replaces the arrow with a picture. SetDropDownButtonDroppedPicture defines an additional picture, which replaces the picture defined using SetDropDownButtonPicture while the dropdown portion is shown. Both pictures are defined using a SFT_PICTURE structure (see Pictures). Use a NULL pointer or an empty SFT_PICTURE structure to remove a picture.

With the SFTBOX_DDBUTTON_DEFAULT style and Windows themes, a button with a picture is drawn using the current Windows theme, without its arrow. Otherwise, a button inside the combo box which has a picture is always drawn as described for SFTBOX_DDBUTTON_CLASSIC.
The pictures are scaled for the monitor's DPI if image scaling is enabled (see Per-Monitor DPI and Scaling).
A dropdown button inside the combo box is highlighted while the mouse cursor is over the button, if it is drawn using Windows themes or as a standard Windows scroll button. A button drawn as described for SFTBOX_DDBUTTON_CLASSIC does not change its appearance. SetHoverButton can be used to turn this off.
GetDropDownButtonRect returns the location of a dropdown button located inside the combo box, in client coordinates of the combo box. An empty rectangle is returned for a simple combo box and for the styles SFTBOX_DDBUTTON_BUTTONHOVER and SFTBOX_DDBUTTON_BUTTONHOVERNT.
GetHWNDDropDownButton returns the window handle of the separate dropdown button used by the styles SFTBOX_DDBUTTON_BUTTONHOVER and SFTBOX_DDBUTTON_BUTTONHOVERNT. The button window only exists while the button is shown and is created again each time, so the window handle should not be saved. NULL is returned if the button is not currently shown and for all other styles.