User32PtInRect(Rectangle, Point) Method

Determines whether the specified point lies within the specified rectangle.

A point is within a rectangle if it lies on the left or top side or is within all four sides.

A point on the right or bottom side is considered outside the rectangle.

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")]
public static bool PtInRect(
	in Rectangle refRect,
	Point pt
)

Parameters

refRect  Rectangle
A pointer to a Rectangle structure that contains the specified rectangle.
pt  Point
A Point structure that contains the specified point.

Return Value

Boolean
If the specified point lies within the rectangle, the return value is .

If the specified point does not lie within the rectangle, the return value is

Remarks

See Also