From a65206da4883b79ff3b0a4418562005e267d369e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Apr 2023 16:47:09 +0300 Subject: UI classes: support for 3-state buttons --- src/mir_core/src/Windows/CDlgBase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mir_core/src/Windows/CDlgBase.cpp b/src/mir_core/src/Windows/CDlgBase.cpp index 45ae944e21..fa3c146ce6 100644 --- a/src/mir_core/src/Windows/CDlgBase.cpp +++ b/src/mir_core/src/Windows/CDlgBase.cpp @@ -218,9 +218,11 @@ BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) else if (!wcsicmp(wszClass, L"ComboBox")) new CCtrlCombo(pDlg, id); else if (!wcsicmp(wszClass, L"Button")) { - switch (GetWindowLongW(hwnd, GWL_STYLE) & (BS_CHECKBOX | BS_RADIOBUTTON | BS_AUTOCHECKBOX | BS_AUTORADIOBUTTON)) { + switch (GetWindowLongW(hwnd, GWL_STYLE) & BS_TYPEMASK) { case BS_CHECKBOX: case BS_AUTOCHECKBOX: + case BS_3STATE: + case BS_AUTO3STATE: case BS_RADIOBUTTON: case BS_AUTORADIOBUTTON: new CCtrlCheck(pDlg, id); -- cgit v1.2.3