CreatePolygonRgn

  HRGN CreatePolygonRgn(lppt, cPoints, fnPolyFillMode)    
  CONST POINT *lppt; /* address of array of points */
  int cPoints; /* number of points in array */
  int fnPolyFillMode; /* polygon-filling mode */

The CreatePolygonRgn function creates a polygonal region.

Parameters

lppt

Points to an array of POINT data structures that define the vertices of the polygon. The polygon is assumed closed. Each vertex can be specified only once. The POINT data structure has the following format:

typedef struct tagPOINT { /* pt */

LONG x;

LONG y;

} POINT;

cPoints

Specifies the number of points in the array.

fnPolyFillMode

Specifies the filling mode used to determine which pixels are in the region. The fnPolyFillMode parameter may be either of the following values:

Value Meaning

ALTERNATE Selects alternate mode.
WINDING Selects winding number mode.

See SetPolyFillMode function for an explanation of these modes.

Return Value

The return value identifies a new region if the function is successful. Otherwise, it is NULL.

See Also

DeleteObject, SetPolyFillMode, SelectObject