Polygon

  BOOL Polygon(hdc, lpPoints, nCount)    
  HDC hdc;    
  LPPOINT lpPoints;    
  int nCount;    

The Polygon function draws a polygon consisting of two or more points (vertices) connected by lines. The polygon is filled using the current brush and the current polygon-filling mode. The outline is drawn with the current pen. The polygon is automatically closed by drawing a line from the last vertex to the first.

Parameters

hdc

Identifies the device context.

lpPoints

Points to an array of POINT structures that specify the vertices of the polygon.

nCount

Specifies the number of vertices given in the array, and must be at least 2.

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

The current position is neither used nor updated by this function.

See Also

GetPolyFillMode, SetPolyFillMode, PolyPolygon, Polyline, PolylineTo