HeaderPane
Main

Dark Mode Support

Share Link
Print

SFTDARKMODE Color Constants

Five RGB color constants that define the SftDarkMode palette. The helper uses them when painting the dark dialog background, WM_CTLCOLOR* surfaces, the experimental dark menu bar, and the dark text color used for radio-button labels. Applications can read the same constants when painting their own surfaces against a dark dialog so the colors match the helper's palette exactly.

#define SFTDARKMODE_BG_COLOR        RGB(32, 32, 32)
#define SFTDARKMODE_TEXT_COLOR      RGB(230, 230, 230)
#define SFTDARKMODE_BTNFACE_COLOR   RGB(45, 45, 45)
#define SFTDARKMODE_HOT_COLOR       RGB(55, 55, 55)
#define SFTDARKMODE_PRESSED_COLOR   RGB(32, 32, 32)
ConstantValuePurpose
SFTDARKMODE_BG_COLORRGB(32, 32, 32)Dark background fill. Used for the dialog client area, the brush returned from WM_CTLCOLOR* handlers, and the menu-bar background in the experimental HandleMenuMessage.
SFTDARKMODE_TEXT_COLORRGB(230, 230, 230)Dark-mode text color - applied to WM_CTLCOLOR* HDCs, repainted radio-button labels, and dark-menu items.
SFTDARKMODE_BTNFACE_COLORRGB(45, 45, 45)Dark button-face / panel color, slightly lighter than the dialog background. Provided for application use; the helper does not paint with it directly. Suitable for distinguishing a panel inset from the dialog background.
SFTDARKMODE_HOT_COLORRGB(55, 55, 55)Dark "hot" / hover background. Provided for application use; the helper does not paint with it directly.
SFTDARKMODE_PRESSED_COLORRGB(32, 32, 32)Dark pressed-state background. Equal to SFTDARKMODE_BG_COLOR so a pressed button visually merges with the dialog. Provided for application use; the helper does not paint with it directly.

The constants are plain #define macros that expand to RGB(...). They are visible to both C and C++ code, and to resource scripts after including SftDarkMode.h.

Note: BG and PRESSED are intentionally identical. The pressed-state value exists as a separate constant so application code that wants to special-case pressed rendering can rebind it without changing the dialog background.

See Also SftDarkMode | HandleDialogMessage | HandleMenuMessage


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