From c5048bf13018e4e9e8af3c8759add4dd8aca936d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Apr 2018 15:34:10 +0300 Subject: CDlgBase::OnChange - message processing slightly changed --- src/mir_core/src/CCtrlBase.cpp | 4 +--- src/mir_core/src/CDlgBase.cpp | 5 +++++ src/mir_core/src/mir_core.def | 2 +- src/mir_core/src/mir_core64.def | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mir_core') diff --git a/src/mir_core/src/CCtrlBase.cpp b/src/mir_core/src/CCtrlBase.cpp index ba82c1647f..e0532b68a7 100644 --- a/src/mir_core/src/CCtrlBase.cpp +++ b/src/mir_core/src/CCtrlBase.cpp @@ -95,11 +95,9 @@ void CCtrlBase::NotifyChange() if (!m_parentWnd || m_parentWnd->IsInitialized()) m_bChanged = true; - if (m_parentWnd && !m_bSilent) { - m_parentWnd->OnChange(this); + if (m_parentWnd && !m_bSilent) if (m_parentWnd->IsInitialized()) ::SendMessage(::GetParent(m_parentWnd->GetHwnd()), PSM_CHANGED, 0, 0); - } OnChange(this); } diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index 3fb76249bc..ed3de8d553 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -274,6 +274,11 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) } return FALSE; + case PSM_CHANGED: + if (m_initialized) + OnChange(); + break; + case WM_CONTEXTMENU: if (CCtrlBase *ctrl = FindControl(HWND(wParam))) ctrl->OnBuildMenu(ctrl); diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 04f823d5fd..6e7bf951ce 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -747,7 +747,7 @@ mir_wstrcmpi @280 ?OnApply@CCtrlCombo@@UAEXXZ @914 NONAME ?OnApply@CCtrlEdit@@UAEXXZ @915 NONAME ?OnApply@CDlgBase@@MAEXXZ @916 NONAME -?OnChange@CDlgBase@@MAEXPAVCCtrlBase@@@Z @917 NONAME +?OnChange@CDlgBase@@MAEXXZ @917 NONAME ?OnClose@CDlgBase@@MAEXXZ @918 NONAME ?OnCommand@CCtrlBase@@UAEHPAUHWND__@@GG@Z @919 NONAME ?OnCommand@CCtrlButton@@UAEHPAUHWND__@@GG@Z @920 NONAME diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index a103f25a92..748925cc79 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -747,7 +747,7 @@ mir_wstrcmpi @280 ?OnApply@CCtrlCombo@@UEAAXXZ @914 NONAME ?OnApply@CCtrlEdit@@UEAAXXZ @915 NONAME ?OnApply@CDlgBase@@MEAAXXZ @916 NONAME -?OnChange@CDlgBase@@MEAAXPEAVCCtrlBase@@@Z @917 NONAME +?OnChange@CDlgBase@@MEAAXXZ @917 NONAME ?OnClose@CDlgBase@@MEAAXXZ @918 NONAME ?OnCommand@CCtrlBase@@UEAAHPEAUHWND__@@GG@Z @919 NONAME ?OnCommand@CCtrlButton@@UEAAHPEAUHWND__@@GG@Z @920 NONAME -- cgit v1.2.3