The CRect class is similar to a Windows RECT structure, and also includes member functions to manipulate a CRect and Windows RECT structures.
A CRect object can be passed as a function parameter wherever a LPRECT or RECT structure can be passed.
A CRect contains member variables that define the top-left and bottom-right points of a rectangle. The width or height of the rectangle defined by CRect must not exceed 32,767 units.
When specifying a CRect, you must be careful to construct it so that the top-left point is above and to the left of the bottom-right point in the Windows coordinate system; otherwise, the CRect will not be recognized by some functions. For example, a top left of (10,10) and bottom right of (20,20) defines a valid rectangle; a top left of (20,20) and bottom right of (10,10), an invalid rectangle.
When using overloaded CRect operators, the first operator must be a CRect; the second can be either a RECT or a CRect.
CPoint, CSize