From 28f35e01f7f6ac3d54f3971ff0ee2720126020fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 29 Dec 2020 22:33:33 +0300 Subject: more correct variant of the previous fix --- src/mir_core/src/CDlgBase.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mir_core') diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index a3afbdc8bd..9157269ea1 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -185,10 +185,15 @@ BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) else if (!wcsicmp(wszClass, L"ComboBox")) new CCtrlCombo(pDlg, id); else if (!wcsicmp(wszClass, L"Button")) { - if (GetWindowLongW(hwnd, GWL_STYLE) & (BS_CHECKBOX | BS_RADIOBUTTON | BS_AUTORADIOBUTTON)) + switch (GetWindowLongW(hwnd, GWL_STYLE) & (BS_CHECKBOX | BS_RADIOBUTTON | BS_AUTORADIOBUTTON)) { + case BS_CHECKBOX: + case BS_RADIOBUTTON: + case BS_AUTORADIOBUTTON: new CCtrlCheck(pDlg, id); - else + break; + default: new CCtrlButton(pDlg, id); + } } else if (!wcsicmp(wszClass, L"RichEdit50W")) new CCtrlRichEdit(pDlg, id); -- cgit v1.2.3