SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines whether the tab control is rendered using a dark color palette.
C
void WINAPI SftTabs_SetDarkMode(HWND hwndCtl, int mode); int WINAPI SftTabs_GetDarkMode(HWND hwndCtl); BOOL WINAPI SftTabs_IsDarkModeActive(HWND hwndCtl);
C++
void CSftTabs::SetDarkMode(int mode); int CSftTabs::GetDarkMode() const; BOOL CSftTabs::IsDarkModeActive() const;
hwndCtl
The window handle of the tab control.
mode
Defines the dark mode setting. mode can be one of the following values:
| SFTTABS_DARKMODE_OFF | The tab control is always rendered using the light color palette. This is the default. |
| SFTTABS_DARKMODE_ON | The tab control is always rendered using the dark color palette, regardless of the Windows system setting. |
| SFTTABS_DARKMODE_AUTO | The tab control follows the current Windows "Choose your mode" setting (Light / Dark) and switches automatically when the user changes the system setting. |
GetDarkMode returns a value indicating the current dark mode setting (SFTTABS_DARKMODE_OFF, SFTTABS_DARKMODE_ON or SFTTABS_DARKMODE_AUTO).
IsDarkModeActive returns TRUE if the tab control is currently rendering with the dark color palette, otherwise FALSE. When mode is SFTTABS_DARKMODE_AUTO, the return value reflects the current Windows system setting.
The SetDarkMode, GetDarkMode and IsDarkModeActive functions define and retrieve a tab control's dark mode setting.
Dark mode changes the palette used for the tab control's background, tab labels, active-tab highlight, scroll buttons and close/minimize/restore buttons. Windows themes are suppressed while dark mode is active so the control renders through its built-in dark-aware GDI path rather than the system's light-themed tab style.
When mode is SFTTABS_DARKMODE_AUTO, the tab control tracks WM_SETTINGCHANGE notifications from Windows and re-renders automatically when the user toggles the system Light / Dark setting. A SFTTABSN_DARKMODE_CHANGED notification is sent to the parent window each time the active mode flips so the application can repaint other UI to match.
Caller-supplied color overrides set with SetCtlColors and per-tab colors set in SFTTABS_TAB remain in effect in dark mode unless high contrast mode is also active. Owner-drawn tabs (SFTTABS_DRAWTABPROC) must handle their own dark-mode compliance by reading the current palette from the SFTTABS_DRAWINFO colorBg / colorFg members or by querying IsDarkModeActive.
SetDarkMode is available on Windows 10 and later. On earlier platforms the setting is stored but has no visual effect.
See Also C/C++ API | C++ Classes | Notifications
