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