CRect myRect(0,0,100,100); // create a rectangle myRect.SetRectEmpty(); // set rectangle to empty // myRect is now an empty rectangle
CRect myRect(0,0,100,100); // create a rectangle bool isRectEmpty = myRect.IsRectEmpty(); // check if rectangle is empty if (isRectEmpty) { // do something if rectangle is empty }Package/Library: MFC (Microsoft Foundation Classes) or ATL (Active Template Library) contains the CRect class and its member functions.