Rect::IsEmptyArea-Methode (gdiplustypes.h)

Die Rect::IsEmptyArea-Methode bestimmt, ob dieses Rechteck leer ist.

Syntax

BOOL IsEmptyArea();

Rückgabewert

Typ: BOOL

Wenn das Rechteck leer ist, gibt diese Methode TRUE zurück. Andernfalls wird FALSE zurückgegeben.

Hinweise

Ein Rechteck ist als leer definiert, wenn entweder die Breite oder die Höhe 0 oder weniger ist.

Beispiele

Im folgenden Beispiel wird ein Rect-Objekt erstellt, die Dimensionen des Rechtecks aufgebläht und bestimmt, ob das Rechteck leer ist.

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.
}

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows XP, Windows 2000 Professional [nur Desktop-Apps]
Unterstützte Mindestversion (Server) Windows 2000 Server [nur Desktop-Apps]
Zielplattform Windows
Kopfzeile gdiplustypes.h (include Gdiplus.h)
Bibliothek Gdiplus.lib
DLL Gdiplus.dll

Weitere Informationen

Inflate-Methoden

Stifte, Linien und Rechtecke

Rect

RectF

Verwenden eines Stifts zum Zeichnen von Linien und Rechtecken