HeaderPane
Main

Dark Mode Support

Share Link
Print

SftDarkMode_ApplyToComboBox

Apply dark mode to a combo box and its internal child controls. Use after creating a combo box dynamically (or any time the combo box was not themed by an enclosing SftDarkMode_ApplyToDialog call).

C

void SftDarkMode_ApplyToComboBox(HWND hwndCombo);

Parameters

hwndCombo

The combo box window handle.

Comments

A standard Win32 combo box is a parent window with internal child controls (the edit field for editable combos, the dropdown button, the listbox). Theming only the combo's HWND leaves the children unstyled. ApplyToComboBox sets the DarkMode_CFD theme class on the combo itself, then calls SftDarkMode_ApplyToChildren so the internal children pick up dark theming as well.

The function is a no-op when the helper is not in dark mode - the combo retains its default light styling.

For combo boxes placed via dialog template, SftDarkMode_ApplyToDialog routes through SftDarkMode_ApplyToControl, which already applies DarkMode_CFD to top-level combo controls. ApplyToComboBox is needed only when the combo is created dynamically or when its internal layout has been re-built and the children need re-theming.

See Also ApplyToControl | ApplyToChildren | ApplyToDialog


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.