diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-12 16:30:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-12 16:30:56 +0300 |
commit | c25fef4436c2149b22420b1b5f0848c7ef3d2080 (patch) | |
tree | c766a91e8d972a046186eea9e9f7af659e5bdb92 /src | |
parent | 1a9bad022f94966f07bcfe00e81d61433639e047 (diff) |
fixes #1147 (TabSRMM: numerical options cannot be changed)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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(); |