SftButton/DLL 3.0 - Button Control
SftTree/DLL 8.0 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 4.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 8.0 - Tree Control
SftButton/DLL 3.0 - Button Control
SftTree/DLL 8.0 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 4.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 8.0 - Tree Control
SftTree/NET 2.0 - Tree Control
Selects how the masked edit control participates in Windows dark mode.
C
void SftMask_SetDarkMode(HWND hwndCtl, int mode);
C++
void CSftMask::SetDarkMode(int mode);
hwndCtl
The window handle of the masked edit control.
mode
The dark mode setting. One of the following values:
| SFTMASK_DARKMODE_OFF | Always use the light palette, regardless of the Windows setting. This is the default. |
| SFTMASK_DARKMODE_ON | Always use the dark palette, regardless of the Windows setting. |
| SFTMASK_DARKMODE_AUTO | Follow the Windows "Choose your mode" setting. The control automatically re-renders when the Windows setting flips. |
SetDarkMode selects whether the masked edit control uses the dark or light color palette. The default is SFTMASK_DARKMODE_OFF, which keeps the control in the light palette regardless of the Windows setting - this preserves visual back-compatibility for applications written before dark mode existed. Applications that want to participate in dark mode should set SFTMASK_DARKMODE_AUTO to follow the Windows "Choose your mode" setting, or maintain their own Light / Dark toggle and switch each control to SFTMASK_DARKMODE_ON / OFF as the toggle changes.
Dark mode covers the edit area, caption, buttons and all popup windows (calendar, calculator, autocomplete).
When the mode is SFTMASK_DARKMODE_AUTO, the control sends SFTMASKN_DARKMODE_CHANGED to its parent window each time the active dark mode state flips so the application can repaint its own surrounding chrome.
Caller-supplied explicit color values remain in effect in every mode - SetDarkMode does not override application-chosen colors.
The dark mode setting can also be set through the nDarkMode field of the SFTMASK_CONTROL structure.
See Also GetDarkMode | IsDarkModeActive | SetHighContrastMode | Dark Mode | Notifications
