UnionRect function (winuser.h)
The UnionRect function creates the union of two rectangles. The union is the smallest rectangle that contains both source rectangles.
BOOL UnionRect( [out] LPRECT lprcDst, [in] const RECT *lprcSrc1, [in] const RECT *lprcSrc2 );
A pointer to the RECT structure that will receive a rectangle containing the rectangles pointed to by the lprcSrc1 and lprcSrc2 parameters.
A pointer to the RECT structure that contains the first source rectangle.
A pointer to the RECT structure that contains the second source rectangle.
If the specified structure contains a nonempty rectangle, the return value is nonzero.
If the specified structure does not contain a nonempty rectangle, the return value is zero.
The system ignores the dimensions of an empty rectangle that is, a rectangle in which all coordinates are set to zero, so that it has no height or no width.
Because applications can use rectangles for different purposes, the rectangle functions do not use an explicit unit of measure. Instead, all rectangle coordinates and dimensions are given in signed, logical values. The mapping mode and the function in which the rectangle is used determine the units of measure.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|