BOOL CRectTracker::TrackRubberBand(CWnd* pWnd, CPoint point, BOOL bAllowInvert) { // simply call helper function to track from bottom right handle m_bAllowInvert = bAllowInvert; m_rect.SetRect(point.x, point.y, point.x, point.y); return TrackHandle(hitBottomRight, pWnd, point, NULL); }
//------------------------------------------------------ BOOL CRectTracker::TrackRubberBand( HWND hWnd, const LPPOINT point ) { ATLASSERT(point); memcpy(&CurPos.Begin, point, sizeof(POINT)); memcpy(&CurPos.End, point, sizeof(POINT)); return TrackHandle( hWnd, point, hitEnd ); };
BOOL CAxRectTracker::Track(CWnd* pWnd, CPoint point, BOOL bAllowInvert, CWnd* pWndClipTo) { // perform hit testing on the handles int nHandle = HitTestHandles(point); if (nHandle < 0) { // didn't hit a handle, so just return FALSE return FALSE; } // otherwise, call helper function to do the tracking m_bAllowInvert = bAllowInvert; return TrackHandle(nHandle, pWnd, point, pWndClipTo); }
//------------------------------------------------------ BOOL CRectTracker::Track( HWND hWnd, const LPPOINT point ) { return TrackHandle( hWnd, point, HitTest(point) ); };