From c25fef4436c2149b22420b1b5f0848c7ef3d2080 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Feb 2018 16:30:56 +0300 Subject: fixes #1147 (TabSRMM: numerical options cannot be changed) --- src/mir_core/src/CDlgBase.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/mir_core') diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index f975f38f8b..eaa9954261 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -120,6 +120,25 @@ int CDlgBase::Resizer(UTILRESIZECONTROL*) return RD_ANCHORX_LEFT | RD_ANCHORY_TOP; } +BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) +{ + CDlgBase *pDlg = (CDlgBase*)lParam; + int id = GetWindowLongPtr(hwnd, GWLP_ID); + if (id <= 0) + return TRUE; + + CCtrlBase *ctrl = pDlg->FindControl(id); + if (ctrl != nullptr) + return TRUE; + + wchar_t wszClass[100]; + GetClassName(hwnd, wszClass, _countof(wszClass)); + if (!wcsicmp(wszClass, L"EDIT")) + new CCtrlEdit(pDlg, id); + + return TRUE; +} + INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -127,6 +146,8 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) m_initialized = false; TranslateDialog_LP(m_hwnd, GetPluginLangByInstance(m_hInst)); + ::EnumChildWindows(m_hwnd, &GlobalFieldEnum, LPARAM(this)); + NotifyControls(&CCtrlBase::OnInit); OnInitDialog(); -- cgit v1.2.3