CRect::MoveToXY

Call this function to move the rectangle to the absolute x- and y-coordinates specified.

void MoveToXY( 
   int x, 
   int y  
) throw( );
void MoveToXY( 
   POINT point  
) throw( );

Parameters

  • x
    The absolute x-coordinate for the upper-left corner of the rectangle.

  • y
    The absolute y-coordinate for the upper-left corner of the rectangle.

  • point
    A POINT structure specifying the absolute upper-left corner of the rectangle.

Example

CRect rect(0, 0, 100, 100);

rect.MoveToXY(10, 10);

// rect is now (10, 10, 110, 110);
ASSERT(rect == CRect(10, 10, 110, 110));   

Requirements

Header: atltypes.h

See Also

Reference

CRect Class

Hierarchy Chart

CRect::MoveToX

CRect::MoveToY

Other Resources

CRect Members