HeaderPane
Main
Hide
Share Link
Print

Using Themes

A combo box control uses Windows themes (visual styles) by default, so it matches the standard Windows controls of the application. If Windows themes are not available, the control uses its built-in display style.

Without ThemesWith Themes

SetUseThemes defines whether the combo box can use Windows themes. If set to FALSE, themes are not honored and the control is rendered using the built-in style, even if Windows themes are available. The setting applies to the entire combo box, including the static portion, the dropdown portion and the dropdown button. The combo box updates automatically when the user changes the Windows theme.

What Is Themed

Borders

A combo box created with the WS_BORDER window style or the WS_EX_CLIENTEDGE extended window style has a border. The iBorderStyle member of the SFTBOX_CONTROL structure describes the border (SFTBOX_BORDER_NONE, SFTBOX_BORDER_FLAT or SFTBOX_BORDER_CLIENT). With Windows themes, a combo box with a border always uses the border defined by the theme. Without Windows themes, SFTBOX_BORDER_FLAT is a thin border and SFTBOX_BORDER_CLIENT is a sunken, three-dimensional border.

Colors

Keep in mind that some color definitions have no effect when Windows themes are used. This applies to the portions drawn by the theme, mainly the header colors and the dropdown button colors of the SFTBOX_COLORS structure (see SetCtlColors).

Individual headers can use their own colors, even if Windows themes are used. For a column header, set the fColorsOverrideTheme member of the SFTBOX_COLUMN structure to TRUE and define the headerColor... members. For a row header, add SFTBOX_ROW_COLORSOVERRIDETHEME to the flag2 member of the SFTBOX_ROW structure.

Dark Mode and High Contrast

Windows themes remain in use while dark mode is active. The border and the dropdown button are then drawn using the dark variant of the Windows theme (see Dark Mode). With Windows High Contrast, the colors of the user's contrast theme are used (see High Contrast).

Testing

To prepare an application for proper themes support, the combo box should be viewed both with and without Windows themes (using SetUseThemes), to make sure that it is visually satisfactory in both cases. The SftBox Wizard can be used to preview a combo box design.


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