HeaderPane
Main
Hide
Share Link
Print

DropDownButtonStyle

Defines the dropdown button's display style.

C

int WINAPI SftBox_GetDropDownButtonStyle(HWND hwndCtl);
void WINAPI SftBox_SetDropDownButtonStyle(HWND hwndCtl, int style);

C++

int CSftBox::GetDropDownButtonStyle() const;
void CSftBox::SetDropDownButtonStyle(int style);

Parameters

hwndCtl

The window handle of the combo box control.

style

Defines the dropdown button's display style. style can be one of the following values:

SFTBOX_DDBUTTON_DEFAULTThe dropdown button is drawn using the current Windows theme. If Windows themes are not available, the button is drawn like SFTBOX_DDBUTTON_WINCLASSIC. This is the default.
SFTBOX_DDBUTTON_WINCLASSICThe dropdown button is drawn as a standard Windows button without using Windows themes.
SFTBOX_DDBUTTON_CLASSICThe dropdown button is drawn as a three-dimensional button using the dropdown button colors of the combo box (see SFTBOX_COLORS and SetCtlColors).
SFTBOX_DDBUTTON_BUTTONHOVERThe combo box does not contain a dropdown button. Instead, a button is shown next to the combo box while the mouse cursor is located on the combo box or while the combo box has the input focus. The button is drawn using the current Windows theme (if available).
SFTBOX_DDBUTTON_BUTTONHOVERNTSame as SFTBOX_DDBUTTON_BUTTONHOVER, but the button is drawn without using Windows themes.

Returns

GetDropDownButtonStyle returns the current dropdown button style (see style above).

Comments

The GetDropDownButtonStyle and SetDropDownButtonStyle functions define the dropdown button's display style.

If an invalid style value is specified, the SetDropDownButtonStyle function call is ignored.

With the styles SFTBOX_DDBUTTON_BUTTONHOVER and SFTBOX_DDBUTTON_BUTTONHOVERNT, the complete width of the combo box is available for the static portion or the edit control portion. The button is located outside of the combo box, at its right edge (at its left edge if the combo box was created with the WS_EX_RIGHT extended window style). It is removed a short time after the mouse cursor leaves the combo box, unless the combo box has the input focus. While the button is shown, its window handle can be retrieved using GetHWNDDropDownButton. GetDropDownButtonRect returns an empty rectangle.

The arrow displayed on the dropdown button can be replaced by a picture using SetDropDownButtonPicture and SetDropDownButtonDroppedPicture. While a picture is defined, the SFTBOX_DDBUTTON_DEFAULT style draws the button using the current Windows theme (if available) and the SFTBOX_DDBUTTON_WINCLASSIC style draws it like SFTBOX_DDBUTTON_CLASSIC.

SetHoverButton defines whether the dropdown button changes its appearance when the mouse cursor is located on the button.

A simple combo box does not have a dropdown button.

See Also C/C++ API | Categories | Notifications


Last Updated 11/22/2026 - (email)
© 2026 Softel vdm, Inc.