Polyline function (wingdi.h)

The Polyline function draws a series of line segments by connecting the points in the specified array.

Syntax

BOOL Polyline(
  [in] HDC         hdc,
  [in] const POINT *apt,
  [in] int         cpt
);

Parameters

[in] hdc

A handle to a device context.

[in] apt

A pointer to an array of POINT structures, in logical units.

[in] cpt

The number of points in the array. This number must be greater than or equal to two.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The lines are drawn from the first point through subsequent points by using the current pen. Unlike the LineTo or PolylineTo functions, the Polyline function neither uses nor updates the current position.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

Line and Curve Functions

LineTo

Lines and Curves Overview

MoveToEx

POINT

PolyPolyline

PolylineTo