This topic has not yet been rated - Rate this topic

PtInRegion function

Applies to: desktop apps only

The PtInRegion function determines whether the specified point is inside the specified region.

Syntax

BOOL PtInRegion(
  __in  HRGN hrgn,
  __in  int X,
  __in  int Y
);

Parameters

hrgn [in]

Handle to the region to be examined.

X [in]

Specifies the x-coordinate of the point in logical units.

Y [in]

Specifies the y-coordinate of the point in logical units.

Return value

If the specified point is in the region, the return value is nonzero.

If the specified point is not in the region, the return value is zero.

Examples

For an example, see Drawing Markers.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Regions Overview
Region Functions
RectInRegion

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Not concurrently safe
Despite it doesn't change the state of a region, if used concurrently the returning values are often incorrect.