PtInRect

Syntax

BOOL PtInRect(lpRect,Point)

This function specifies whether the specified point lies within a given 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 outside the rectangle.

Parameter Type/Description  

lpRect LPRECT Points to a RECT data structure that contains the specified rectangle.  
Point POINT Specifies a POINT data structure that contains the specified point.  

Return Value

The return value specifies whether the specified point lies within the given rectangle. It is nonzero if the point lies within the given rectangle. Otherwise, it is zero.