HeaderPane
Main
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 of an editable combo, and the list of a CBS_SIMPLE combo). 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 applies DarkMode_CFD to the combo window itself but not to its child windows. Call ApplyToComboBox for editable combos (whose edit field is a child window), for dynamically created combos, and after the combo's internal layout is rebuilt.

See Also ApplyToControl | ApplyToChildren | ApplyToDialog


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