template <class BASE> void CDialogMinTrayBtn<BASE>::MinTrayBtnEnable() { if (MinTrayBtnIsEnabled()) return; m_bMinTrayBtnEnabled = TRUE; MinTrayBtnSetUp(); }
TEMPLATE void CDialogMinTrayBtn<BASE>::MinTrayBtnEnable() { if (MinTrayBtnIsEnabled()) return; m_bMinTrayBtnEnabled = TRUE; MinTrayBtnSetUp(); }
template <class BASE> void CDialogMinTrayBtn<BASE>::MinTrayBtnDisable() { if (!MinTrayBtnIsEnabled()) return; m_bMinTrayBtnEnabled = FALSE; if (m_bMinTrayBtnCapture) { ReleaseCapture(); m_bMinTrayBtnCapture = FALSE; } MinTrayBtnSetUp(); }
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)); }
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)); }
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(); }