void CSkinDlg::OnMouseLeave() { m_bMouseTracking=FALSE; CancelHover(); Invalidate(); CDialog::OnMouseLeave(); }
void CSkinDlg::OnKillFocus(CWnd* pNewWnd) { CancelHover(); if(IsWindow(m_hWnd)&&IsWindowVisible()) Invalidate(); CDialog::OnKillFocus(pNewWnd); }
void CButtonST::OnMouseMove(UINT nFlags, CPoint point) { CWnd* wndUnderMouse = NULL; CWnd* wndActive = this; TRACKMOUSEEVENT csTME; CButton::OnMouseMove(nFlags, point); ClientToScreen(&point); wndUnderMouse = WindowFromPoint(point); // If the mouse enter the button with the left button pressed then do nothing if (nFlags & MK_LBUTTON && m_bMouseOnButton == FALSE) return; // If our button is not flat then do nothing if (m_bIsFlat == FALSE) return; if (m_bAlwaysTrack == FALSE) wndActive = GetActiveWindow(); if (wndUnderMouse && wndUnderMouse->m_hWnd == m_hWnd && wndActive) { if (!m_bMouseOnButton) { m_bMouseOnButton = TRUE; Invalidate(); csTME.cbSize = sizeof(csTME); csTME.dwFlags = TME_LEAVE; csTME.hwndTrack = m_hWnd; ::_TrackMouseEvent(&csTME); } // if } else CancelHover(); } // End of OnMouseMove
void CButtonST::OnEnable(BOOL bEnable) { CButton::OnEnable(bEnable); if (bEnable == FALSE) { CancelHover(); } } // End of OnEnable
void CButtonST::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CButton::OnActivate(nState, pWndOther, bMinimized); if (nState == WA_INACTIVE) { CancelHover(); } } // End of OnActivate
void CButtonST::OnEnable(BOOL bEnable) { CButton::OnEnable(bEnable); if (bEnable == FALSE) { CWnd* pWnd = GetParent()->GetNextDlgTabItem(this); if (pWnd) pWnd->SetFocus(); else GetParent()->SetFocus(); CancelHover(); } // if } // End of OnEnable
void CSkinDlg::OnMouseMove(UINT nFlags, CPoint point) { if(nFlags!=MK_LBUTTON) { if(!m_bMouseTracking) { TRACKMOUSEEVENT tme; tme.cbSize =sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; tme.hwndTrack = this->m_hWnd; if(::_TrackMouseEvent(&tme)) { m_bMouseTracking=TRUE; } } } CancelHover(); CDialog::OnMouseMove(nFlags, point); }
void CButtonST::OnCancelMode() { CButton::OnCancelMode(); CancelHover(); } // End of OnCancelMode
void CButtonST::OnKillFocus(CWnd * pNewWnd) { CButton::OnKillFocus(pNewWnd); CancelHover(); } // End of OnKillFocus
//wyw_0206 add LRESULT CButtonST::OnMouseLeave(WPARAM wParam, LPARAM lParam) { CancelHover(); return 0; }
void CButtonST::OnCancelMode() { DefWindowProc(); CancelHover(); }
void CButtonST::OnEnable(BOOL bEnable) { DefWindowProc(); if (!bEnable) CancelHover(); }
void CButtonST::OnActivate(UINT nState, BOOL bMinimized, HWND pWndOther) { DefWindowProc(); if (nState == WA_INACTIVE) { CancelHover(); } }
LRESULT CButtonST::OnKillFocus(HWND hWnd) { DefWindowProc(); CancelHover(); return 0; }