summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-24 18:07:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-24 18:07:04 +0300
commitd32ceca89165c3f537c5b32c38c153d26cd4aed7 (patch)
tree03d9f9f5517e0bb059fbf13b1a5411c6ec56a369 /src/mir_core
parentd87f80faa7cb073ee7f19176192cb1465c488ed8 (diff)
more effective way to use OnChange callbacks automatically
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/CCtrlCheck.cpp1
-rw-r--r--src/mir_core/src/CDlgBase.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mir_core/src/CCtrlCheck.cpp b/src/mir_core/src/CCtrlCheck.cpp
index 7d26af32fd..a20a1a9275 100644
--- a/src/mir_core/src/CCtrlCheck.cpp
+++ b/src/mir_core/src/CCtrlCheck.cpp
@@ -58,7 +58,6 @@ int CCtrlCheck::GetState()
void CCtrlCheck::SetState(int state)
{
::SendMessage(m_hwnd, BM_SETCHECK, state, 0);
- OnChange(this);
}
bool CCtrlCheck::IsChecked()
diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp
index 7c079cc258..dcfe15b292 100644
--- a/src/mir_core/src/CDlgBase.cpp
+++ b/src/mir_core/src/CDlgBase.cpp
@@ -218,6 +218,9 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
if (!OnInitDialog())
return FALSE;
+ for (auto &it : m_controls)
+ it->OnChange(it);
+
m_bInitialized = true;
return TRUE;