User32IntersectRect Method

Calculates the intersection of two source NativeRectangle and places the coordinates of the intersection NativeRectangle into the destination NativeRectangle.

If the source NativeRectangle do not intersect, an empty NativeRectangle (in which all coordinates are set to zero) is placed into the destination NativeRectangle.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool IntersectRect(
	out NativeRectangle refDstRect,
	in NativeRectangle refSrcRect1,
	in NativeRectangle refSrcRect2
)

Parameters

refDstRect  NativeRectangle
A pointer to the NativeRectangle structure that is to receive the intersection of the rectangles pointed to by the refSrcRect1 and refSrcRect2 parameters.

This parameter cannot be .

refSrcRect1  NativeRectangle
A pointer to the NativeRectangle structure that contains the first source rectangle.
refSrcRect2  NativeRectangle
A pointer to the NativeRectangle structure that contains the second source rectangle.

Return Value

Boolean
If the rectangles intersect, the return value is .

If the rectangles do not intersect, the return value is

Remarks

See Also