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
SftTree/DLL 8.0 supports dark mode. Users who have selected the Windows 10 "Choose your mode" accessibility setting to Dark will see SftTree controls rendered with a dark color palette; users who have selected Light see the traditional palette. The tree control follows the system setting automatically - no per-application setup is required.
What changes in dark mode: the tree background, item text, grid lines, selection highlight, column headers, column footers, row headers, row/column-header corner, row/column-footer corner and the splitter bar (in a split tree control) all switch to dark-palette colors. Cell edit controls, tooltips and the Wizard's editors inherit the dark palette automatically via DarkMode_Explorer theming.
The tree control's dark mode setting has three values (see SetDarkMode):
| AUTO (default) | Follow the Windows "Choose your mode" setting. The control re-renders when the system setting flips. |
| ON | Always use the dark palette, regardless of the Windows setting. Useful when the hosting application has its own Light / Dark toggle and wants the tree to follow it. |
| OFF | Always use the light palette, regardless of the Windows setting. Useful when the application does not yet support dark mode end-to-end and mixing dark and light controls would look wrong. |
SFTTREEN_DARKMODE_CHANGED is sent to the parent window each time the active dark mode state flips (AUTO mode only) so the application can repaint its own chrome around the tree control. IsDarkModeActive reports the current state at any time.
Caller-supplied color overrides (SetCtlColors, per-column colors, permanent background, odd-row colors, selection colors, grid colors) are still honored in dark mode - the control does not override application-chosen colors. If you need specific cells to stand out in dark mode, pick accent colors that read well on both a light and a dark background (mid-tone saturated values in the RGB 30-210 range tend to work in both).
Windows themes are suppressed while dark mode is active. Header, footer and other chrome elements fall back to the tree's built-in dark-aware GDI rendering path so they match the control's dark palette instead of the system's light-themed header style.
Owner-draw code is responsible for its own dark-mode compliance. Every SFTTREE_OWNERDRAW callback receives a fDarkMode field; owner-draw code should inspect it on each paint and pick its own colors accordingly. The default render path handles non-owner-drawn areas automatically.
The tree control follows the dark mode setting at the control level. The hosting dialog itself - title bar, dialog background, static labels, group boxes, edits and any standard Win32 controls placed alongside the tree - also needs to be wired into dark mode for the dialog to render coherently. The shared SftDarkMode helper provides that integration: a single header (SftDarkMode.h) used by every Softel vdm DLL product that handles dialog title bars, WM_CTLCOLOR* responses, the Windows "Choose your mode" toggle, and dark NC scrollbars on standard controls.
A typical adoption is four call sites: SftDarkMode_Init at process startup, SftDarkMode_ApplyToDialog from each WM_INITDIALOG, SftDarkMode_HandleDialogMessage routed from each dialog procedure, and an optional SftDarkMode_SetActive when the application exposes its own Light / Dark toggle.
Platform note: Dark mode requires Windows 10 or later. On earlier platforms the setting is stored but has no visual effect.
