Size::Equals method (gdiplustypes.h)

The Size::Equals method determines whether two Size objects are equal.

Syntax

BOOL Equals(
  [in, ref] const Size & sz
);

Parameters

[in, ref] sz

Type: const Size

Reference to a Size object that is compared to this Size object.

Return value

Type: BOOL

If the Width and Height data members of the two Size objects are equal, this method returns TRUE; otherwise, it returns FALSE.

Remarks

Two Size objects are defined as equal if the Width and Height data members are equal.

Examples

The following example creates a Rect object, gets the size of the rectangle, and determines whether the rectangles are equal.

Rect rect(50, 30, 200, 100);
Size desiredSize(200, 100);
Size rectSize;

// Get the size of the rectangle.
rect.GetSize(&rectSize);

if(rectSize.Equals(desiredSize))
{
   // The rectangle has the desired size.
} 

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplustypes.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Rect

Size

SizeF