User32SubtractRect(NativeRectangle, NativeRectangle, NativeRectangle) Method
Determines the coordinates of a
NativeRectangle
formed by subtracting one
NativeRectangle from another.
The function only subtracts the
NativeRectangle specified by
refSrcRect2
from the
NativeRectangle specified by
refSrcRect1
when the rectangles intersect completely in either the x- or y- direction.
For example, if
refSrcRect1 has the coordinates {10, 10, 100, 100}
and
refSrcRect2 has the coordinates {50, 50, 150, 150},
the function sets the coordinates of the
NativeRectangle pointed to
by
refDstRect to {10, 10, 100, 100}.
If
refSrcRect1 has the coordinates {10, 10, 100, 100}
and
refSrcRect2 has the coordinates {50, 10, 150, 150},
however, the function sets the coordinates of the
NativeRectangle pointed to
by
refDstRect to {10, 10, 50, 100}.
In other words, the resulting
NativeRectangle is the bounding box of the geometric difference.