Beispiel #1
0
void CSkinDlg::OnMouseLeave()
{
	m_bMouseTracking=FALSE;
	CancelHover();
	Invalidate();
	CDialog::OnMouseLeave();
}
Beispiel #2
0
void CSkinDlg::OnKillFocus(CWnd* pNewWnd)
{
	CancelHover();
	if(IsWindow(m_hWnd)&&IsWindowVisible())
		Invalidate();
	CDialog::OnKillFocus(pNewWnd);
}
Beispiel #3
0
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
Beispiel #4
0
void CButtonST::OnEnable(BOOL bEnable) 
{
    CButton::OnEnable(bEnable);
    
    if (bEnable == FALSE)    
    {
        CancelHover();
    }
} // End of OnEnable
Beispiel #5
0
void CButtonST::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) 
{
    CButton::OnActivate(nState, pWndOther, bMinimized);
    
    if (nState == WA_INACTIVE)   
    {
        CancelHover();
    }
} // End of OnActivate
Beispiel #6
0
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
Beispiel #7
0
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);
}
Beispiel #8
0
void CButtonST::OnCancelMode() 
{
    CButton::OnCancelMode();
        
    CancelHover();
} // End of OnCancelMode
Beispiel #9
0
void CButtonST::OnKillFocus(CWnd * pNewWnd)
{
    CButton::OnKillFocus(pNewWnd);

    CancelHover();
} // End of OnKillFocus
Beispiel #10
0
//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;
}