Delen via


CRectTracker::AdjustRect

Called by the framework when the tracking rectangle is resized by using a resize handle.

virtual void AdjustRect( 
   int nHandle, 
   LPRECT lpRect  
);

Parameters

  • nHandle
    Index of handle used.

  • lpRect
    Pointer to the current size of the rectangle. (The size of a rectangle is given by its height and width.)

Remarks

The default behavior of this function allows the rectangle's orientation to change only when Track and TrackRubberBand are called with inverting allowed.

Override this function to control the adjustment of the tracking rectangle during a dragging operation. One method is to adjust the coordinates specified by lpRect before returning.

Special features that are not directly supported by CRectTracker, such as snap-to-grid or keep-aspect-ratio, can be implemented by overriding this function.

Requirements

Header: afxext.h

See Also

Reference

CRectTracker Class

Hierarchy Chart

CRectTracker::Track

CRectTracker::TrackRubberBand

CRectTracker::OnChangedRect