Polyline

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

BOOL Polyline(
  HDC hdc,            // handle to device context
  CONST POINT *lppt,  // pointer to array containing endpoints
  int cPoints         // number of points in the array
);
 

Parameters

hdc
Handle to a device context.
lppt
Pointer to an array of POINT structures. Each structure in the array identifies a point in logical space.
cPoints
Specifies the number of points in the array. This number must be greater than or equal to two.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Windows NT: To get extended error information, call GetLastError.

Remarks

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

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Lines and Curves Overview, Line and Curve Functions, LineTo, MoveToEx, POINT, PolylineTo, PolyPolyline