void CEGPaneBar::OnLButtonDown(UINT nFlags, CPoint point) { if ( m_iSize <= 4 || m_dragRect.PtInRect(point) ) { m_bDragging = TRUE; SetDragCursor(); SetCapture(); SetFocus(); CRect rc; GetClientRect(rc); OnInvertTracker(m_dragRect); return; } else { if( m_hPane ) { if( m_hPane != ::SetFocus( m_hPane ) ) InvalidateCaption(); } CRect rcCloseButton = GetCloseButtonRect(); if ( rcCloseButton.PtInRect( point ) ) { SetCapture(); m_bClosePressed = TRUE; InvalidateCaption(); } } CControlBar::OnLButtonDown(nFlags, point); }
void CEditTreeCtrl::DragMove() { ASSERT(m_pDragData != 0); TRACE1(_T("CEditTreeCtrl::DragMove('%s')\n"), LPCTSTR(GetItemText(m_pDragData->GetDragItem()))); EDropHint eHint; HTREEITEM hDrop = GetDropTarget(eHint); SetDragCursor(hDrop, eHint); }
BOOL CEGPaneBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { if (nHitTest == HTCLIENT) { CPoint point; ::GetCursorPos (&point); ScreenToClient (&point); if ( m_bDragging || m_dragRect.PtInRect(point) ) { SetDragCursor(); return TRUE; } } return CControlBar::OnSetCursor(pWnd, nHitTest, message); }
void CEGControlBar::OnLButtonDown(UINT nFlags, CPoint point) { if ( m_iSize <= 4 || m_dragRect.PtInRect(point) ) { m_bDragging = TRUE; SetDragCursor(); SetCapture(); SetFocus(); CRect rc; GetClientRect(rc); OnInvertTracker(m_dragRect); return; } CControlBar::OnLButtonDown(nFlags, point); }