summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/CDlgBase.cpp21
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();