summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-15 14:00:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-15 14:00:21 +0300
commit11bccc883cdd9ef9ed048d983271885c75d79e1f (patch)
treed298656b7486ac4bdb698d5ccaceec3f87ad2904
parentaf13074bb33e3a00b763e1fb14a7d3d22680c1d6 (diff)
fixes #2763 (we don't care about changes in disabled controls)
-rw-r--r--src/mir_core/src/CCtrlBase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mir_core/src/CCtrlBase.cpp b/src/mir_core/src/CCtrlBase.cpp
index c07055c658..a4fd2ecc29 100644
--- a/src/mir_core/src/CCtrlBase.cpp
+++ b/src/mir_core/src/CCtrlBase.cpp
@@ -47,7 +47,12 @@ CCtrlBase::~CCtrlBase()
void CCtrlBase::OnInit()
{
- m_hwnd = (m_idCtrl && m_parentWnd && m_parentWnd->GetHwnd()) ? GetDlgItem(m_parentWnd->GetHwnd(), m_idCtrl) : nullptr;
+ if (m_idCtrl && m_parentWnd && m_parentWnd->GetHwnd()) {
+ m_hwnd = GetDlgItem(m_parentWnd->GetHwnd(), m_idCtrl);
+
+ m_bSilent = (GetWindowLong(m_hwnd, GWL_STYLE) & WS_DISABLED) == 0;
+ }
+ else m_hwnd = nullptr;
}
void CCtrlBase::OnDestroy()