Partager via


CRect::MoveToX

Call this function to move the rectangle to the absolute x-coordinate specified by x.

void MoveToX( 
   int x  
) throw( );

Parameters

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

Example

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

rect.MoveToX(10);

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

Requirements

Header: atltypes.h

See Also

Concepts

CRect Class

CRect Members

Hierarchy Chart

CRect::MoveToXY

CRect::MoveToY