1. Base concept and principle on how to use CRectTracker:
Allows an item to be displayed, moved, and resized in different fashions.
--Form MSDN
Example to use this (when you drag the mouse, the RectTracker comes):
1) QQ Snap Desktop picture;
2) Windows explorer;
....
2. Important member funtions of CRectTracker:
SetRect // set the rect of rect tracker
Track // change the position of rect tracker
SetCursor // Change the cursor
HitTest
Draw // draw the rect tracker
Refer MSDN for the Detail.
3. Take an example to show how to use the CRectTracker.
Implement goal show as the follow picture:
Environment VS 2008 Windows XP EN
1) start a MFC dialog based project named tracker
2) Add three member:
CRectTracker m_tracker; // CRectTracker object
CPoint m_start; // the the mouse down, record the start point here
BOOL m_bDraw; // whether draw
3) Add a WM_LBUTTONDOWN handle function(OnLButtonDown)













