diff options
-rw-r--r-- | src/mir_core/src/CCtrlButton.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlButton.cpp b/src/mir_core/src/CCtrlButton.cpp index 0ed43e8466..94f07e77f7 100644 --- a/src/mir_core/src/CCtrlButton.cpp +++ b/src/mir_core/src/CCtrlButton.cpp @@ -38,7 +38,8 @@ BOOL CCtrlButton::OnCommand(HWND, WORD, WORD idCode) void CCtrlButton::Click() { - ::SendMessage(m_parentWnd->GetHwnd(), WM_COMMAND, MAKELONG(m_idCtrl, BN_CLICKED), 0); + if (Enabled()) + ::SendMessage(m_parentWnd->GetHwnd(), WM_COMMAND, MAKELONG(m_idCtrl, BN_CLICKED), 0); } bool CCtrlButton::IsPushed() const @@ -48,5 +49,6 @@ bool CCtrlButton::IsPushed() const void CCtrlButton::Push(bool bPushed) { - ::SendMessage(m_hwnd, BM_SETCHECK, (bPushed) ? BST_CHECKED : BST_UNCHECKED, 0); + if (Enabled()) + ::SendMessage(m_hwnd, BM_SETCHECK, (bPushed) ? BST_CHECKED : BST_UNCHECKED, 0); } |