Esempio n. 1
0
template <class BASE> void CDialogMinTrayBtn<BASE>::MinTrayBtnEnable()
{
	if (MinTrayBtnIsEnabled())
		return;

	m_bMinTrayBtnEnabled = TRUE;
	MinTrayBtnSetUp();
}
Esempio n. 2
0
TEMPLATE void CDialogMinTrayBtn<BASE>::MinTrayBtnEnable()
{
    if (MinTrayBtnIsEnabled())
       return;

    m_bMinTrayBtnEnabled = TRUE;
    MinTrayBtnSetUp();
}
Esempio n. 3
0
template <class BASE> void CDialogMinTrayBtn<BASE>::MinTrayBtnDisable()
{
	if (!MinTrayBtnIsEnabled())
		return;

	m_bMinTrayBtnEnabled = FALSE;
	if (m_bMinTrayBtnCapture)
	{
		ReleaseCapture();
		m_bMinTrayBtnCapture = FALSE;
	}
	MinTrayBtnSetUp();
}
Esempio n. 4
0
template <class BASE> void CDialogMinTrayBtn<BASE>::OnLButtonUp(UINT nFlags, CPoint point) 
{
	if ((GetStyle() & WS_DISABLED) || (!m_bMinTrayBtnCapture))
	{
		BASE::OnLButtonUp(nFlags, point);
		return;
	}

	ReleaseCapture();
	m_bMinTrayBtnCapture = FALSE;
	MinTrayBtnSetUp();

	ClientToScreen(&point);
	if (MinTrayBtnHitTest(point))
		SendMessage(WM_SYSCOMMAND, SC_MINIMIZETRAY, MAKEWPARAM(point.x, point.y)); 
}
Esempio n. 5
0
TEMPLATE void CDialogMinTrayBtn<BASE>::OnLButtonUp(UINT nFlags, CPoint point) 
{
    if ((GetStyle() & WS_DISABLED) || !m_bMinTrayBtnCapture)
    {
        BASE::OnLButtonUp(nFlags, point);
        return;
    }

    ReleaseCapture();
    m_bMinTrayBtnCapture = FALSE;
    MinTrayBtnSetUp();

    ClientToScreen(&point);
    if (MinTrayBtnHitTest(point))
		SendMessage(WM_SYSCOMMAND, MP_MINIMIZETOTRAY, MAKELONG(point.x, point.y));
}
Esempio n. 6
0
template <class BASE> void CDialogMinTrayBtn<BASE>::OnMouseMove(UINT nFlags, CPoint point) 
{
	if ((GetStyle() & WS_DISABLED) != 0 || (!m_bMinTrayBtnCapture))
	{ 
		BASE::OnMouseMove(nFlags, point);
		return;
	}

	ClientToScreen(&point);
	m_bMinTrayBtnHitTest = MinTrayBtnHitTest(point);
	if (m_bMinTrayBtnHitTest)
	{
		if (m_bMinTrayBtnUp)
			MinTrayBtnSetDown();
	}
	else if (!m_bMinTrayBtnUp)
		MinTrayBtnSetUp();
}