Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Rect.IsEmptyArea method

Applies to: desktop apps only

The Rect::IsEmptyArea method determines whether this rectangle is empty.

Syntax

BOOL IsEmptyArea() const;

Parameters

This method has no parameters.

Return value

Type:

Type: BOOL

If the rectangle is empty, this method returns TRUE; otherwise, it returns FALSE.

Remarks

A rectangle is defined as empty if either the width or the height is zero or less.

Examples

The following example creates a Rect object, inflates the dimensions of the rectangle, and determines whether the rectangle is empty.


VOID Example_IsEmptyArea(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a Rect object, and inflate the dimensions.
   Rect rect(50, 50, 200, 100);
   rect.Inflate(0, -120);

   // Determine whether the rectangle is empty.
   if(rect.IsEmptyArea())

   // The rectangle does not enclose any area.
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplustypes.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Rect
Inflate Methods
RectF
Using a Pen to Draw Lines and Rectangles
Pens, Lines, and Rectangles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2014 Microsoft