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

    CancelHover();
} // End of OnKillFocus
示例#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;
}