Click to open or copy the TRACKER project files.
The TRACKER sample is a test application that provides an exhaustive illustration of CRectTracker member functions, styles, and options. For a real-world example that uses CRectTracker, see DRAWCLI, the object-oriented drawing sample application.
TRACKER initially displays a square with four colored and numbered quadrants. The quadrants are displayed to help you see when the square is inverted horizontally and/or vertically. Initially, the square has no CRectTracker adornments. Try the various toolbar commands, or Edit menu commands, to turn on and off CRectTracker styles, including dotted or solid lines; hatched border, inside or outside the rectangle; and resize handles, inside or outside the rectangle.
Notice how the cursor changes shape over parts of the rectangle to indicate what happens if you drag the mouse. Try moving and resizing the rectangle.
This sample demonstrates the following keywords:
CBrush::CreateSolidBrush; CDialog::DoModal; CDocument::OnNewDocument; CDocument::SetModifiedFlag; CDocument::UpdateAllViews; CFrameWnd::Create; CFrameWnd::LoadFrame; CGdiObject::DeleteObject; CObject::AssertValid; CObject::Dump; CObject::Serialize; CRect::Height; CRect::IntersectRect; CRect::Width; CRectTracker::Draw; CRectTracker::GetTrueRect; CRectTracker::HitTest; CRectTracker::SetCursor; CRectTracker::Track; CRectTracker::TrackRubberBand; CView::DoPreparePrinting; CView::GetDocument; CView::OnBeginPrinting; CView::OnDraw; CView::OnEndPrinting; CView::OnPreparePrinting; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::OnFileNew; CWnd::DoDataExchange; CWnd::InvalidateRect; CWnd::OnCreate; CWnd::OnLButtonDown; CWnd::OnSetCursor; CWnd::ShowWindow; CWnd::UpdateWindow; ExtTextOut; GetTextMetrics; LoadBitmap; MessageBeep; PatBlt; RGB; SelectObject; SetBkMode; SetTextAlign; abs