Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinSubtractRect (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINRECTANGLES
BOOL WinSubtractRect(hab, prclDst, prclSrc1, prclSrc2)
HAB hab; /* handle of the anchor block */
PRECTL prclDst; /* address of the destination rectangle structure */
PRECTL prclSrc1; /* address of the first rectangle structure */
PRECTL prclSrc2; /* address of the second rectangle structure */
The WinSubtractRect function subtracts one rectangle from another by
subtracting the prclSrc2 parameter from the prclSrc1 parameter. Subtracting
one rectangle from another does not always result in a rectangular area; in
this case, WinSubtractRect returns prclSrc1 in the prclDst parameter. For
this reason, WinSubtractRect provides only an approximation of subtraction.
However, the area described by prclDst is always greater than or equal to
the "true" result of the subtraction. You can use the GpiCombineRegion
function to calculate the true result of the subtraction of two rectangular
areas, although WinSubtractRect does it much faster.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies an anchor block.
prclDst Points to a RECTL structure that contains the result of the
subtraction of the prclSrc2 parameter from the prclSrc1
parameter.
prclSrc1 Points to a RECTL structure that contains the first source
rectangle.
prclSrc2 Points to a RECTL structure that contains the second source
rectangle.
Return Value
The return value is TRUE if the prclDst parameter points to a nonempty
rectangle. Otherwise, it is FALSE, indicating that prclDst is an empty
rectangle.
See Also
GpiCombineRegion, WinUnionRect, RECTL
♦