CRect rect(10, 20, 100, 80); // (left, top, right, bottom)
int width = rect.Width(); int height = rect.Height();
CRect rect1(10, 20, 100, 80); CRect rect2(50, 30, 120, 100); bool intersects = rect1.IntersectRect(&rect1, &rect2);
CRect rect(10, 20, 100, 80); rect.OffsetRect(50, 30);The CRect class is included in the MFC library, which is a package of C++ classes for developing Windows applications.