HeaderPane
Main

Dark Mode Support

Share Link
Print

SftDarkMode_ApplyToChildren

Apply dark mode theming to every direct child of a window or dialog. Iterates the children and calls SftDarkMode_ApplyToControl on each.

C

void SftDarkMode_ApplyToChildren(HWND hwndParent);

Parameters

hwndParent

The dialog or window whose direct children should be themed.

Comments

ApplyToChildren walks GetWindow(hwndParent, GW_CHILD) and the GW_HWNDNEXT chain, calling SftDarkMode_ApplyToControl on each. It does not recurse into grandchildren - controls that own internal children (combo boxes, custom composite controls) need their own dedicated handling. For combo boxes specifically, SftDarkMode_ApplyToComboBox themes the combo box and its internal children in one call.

ApplyToChildren is called automatically by SftDarkMode_ApplyToDialog and by the WM_SETTINGCHANGE handler inside SftDarkMode_HandleDialogMessage when the user toggles the Windows mode at runtime. Most applications never need to call it directly.

See Also ApplyToControl | ApplyToDialog | ApplyToComboBox


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