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
Values for the nUseThemes field on SFTBUTTON_CONTROL.
| SFTBUTTON_THEME_NO (0) | Themes are not honored. The control paints its background, border and text using caller-supplied colors / fonts. |
| SFTBUTTON_THEME_YES (1) | Themes are fully honored. Windows paints the background and border; text color and font come from the theme. |
| SFTBUTTON_THEME_YES_NOTEXT (2) | Themes are honored for background and border only. The caller-supplied text color and font are used. |
Themes are automatically suppressed when Dark Mode or Windows High Contrast is active, regardless of the nUseThemes setting.
if (HIWORD(wParam) == BN_CLICKED)
MessageBox(hwndDlg, TEXT("Button 3 clicked!"), TEXT("SftButton/DLL"), MB_OK);
else if (HIWORD(wParam) == SFTBUTTONN_DROPDOWNCLICK)
MessageBox(hwndDlg, TEXT("Button 3 drop-down clicked!"), TEXT("SftButton/DLL"), MB_OK);
return TRUE;
case IDC_USE_THEMES:
if (HIWORD(wParam) == BN_CLICKED) {
int useThemes = IsDlgButtonChecked(hwndDlg, IDC_USE_THEMES) == BST_CHECKED
? SFTBUTTON_THEME_YES : SFTBUTTON_THEME_NO;
int ids[] = { IDC_SFTBUTTON1, IDC_SFTBUTTON2, IDC_SFTBUTTON3 };
for (int i = 0; i < (int)(sizeof(ids) / sizeof(ids[0])); ++i) {
HWND hwndBtn = GetDlgItem(hwndDlg, ids[i]);
SFTBUTTON_CONTROL Ctl;
Ctl.cbSize = sizeof(SFTBUTTON_CONTROL);
SftButton_GetControlInfo(hwndBtn, &Ctl);
Ctl.nUseThemes = useThemes;See Also Using Themes | Dark Mode | High Contrast
