diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-29 22:33:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-29 22:33:33 +0300 |
commit | 28f35e01f7f6ac3d54f3971ff0ee2720126020fb (patch) | |
tree | a417b3537885381158ef0d5e8fc87af99683f396 | |
parent | f43c66e09b4af324394f416dfdd99f5faeb7ef46 (diff) |
more correct variant of the previous fix
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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); |