BOOL UnionRect(lprcDest, lprcSrc1, lprcSrc2) | |||||
LPRECT lprcDest; | /* address of structure for union | */ | |||
CONST RECT *lprcSrc1; | /* address of structure with 1st rectangle | */ | |||
CONST RECT *lprcSrc2; | /* address of structure with 2nd rectangle | */ |
This function creates the union of two rectangles. The union is the smallest rectangle that contains both source rectangles.
lprcDest
Points to the RECT data structure that is to receive the new union.
lprcSrc1
Points to a RECT data structure that contains a source rectangle.
lprcSrc2
Points to a RECT data structure that contains a source rectangle.
The return value is TRUE if the function is successful—that is, if the lprcDst parameter contains a nonempty rectangle. It is FALSE if the rectangle is empty or an error occurs.
Windows ignores the dimensions of an empty rectangle, that is, a rectangle that has no height or has no width.
InflateRect, IntersectRect, OffsetRect