WinEqualRect
Appearance
This function compares two rectangles for equality.
Syntax
WinEqualRect(hab, prcl1, prcl2)
Parameters
- hab (HAB) - Input
- Anchor-block handle.
- prcl1 (PRECTL) - Input
- First rectangle.
- Note
- The value of each field in this structure must be in the range -32 768 through 32 767. The data type WRECT can also be used, if supported by the language.
- prcl2 (PRECTL) - Input
- Second rectangle.
- Note
- The value of each field in this structure must be in the range -32 768 through 32 767. The data type WRECT can also be used, if supported by the language.
Returns
- rc (BOOL) - returns
- Equality indicator.
- TRUE
- Rectangles are identical
- FALSE
- Rectangles are not identical, or an error occurred.
Remarks
If both rectangles are empty (for example, they are considered equal even if the actual coordinate values are different.
Errors
Possible returns from WinGetLastError: (No specific errors were listed in the provided text.)
Example Code
#define INCL_WINRECTANGLES /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PRECTL prcl1; /* First rectangle. */ PRECTL prcl2; /* Second rectangle. */ BOOL rc; /* Equality indicator. */ rc = WinEqualRect(hab, prcl1, prcl2);
This example compares two rectangles for equality.
#define INCL_WINRECTANGLES /* Window Rectangle Functions */ #include <os2.h> BOOL fEqual; /* equal indicator */ HAB hab; /* anchor-block handle */ RECTL prclRect1 = {0,0,100,100}; /* first rectangle */ RECTL prclRect2 = {0,0,200,200}; /* second rectangle */ fEqual = WinEqualRect(hab, &prclRect1, &prclRect2);