LineTo

  BOOL LineTo(hdc, nXEnd, nYEnd)    
  HDC hdc; /* device-context handle */
  int nXEnd; /* x-coordinate line's end-point */
  int nYEnd; /* y-coordinate line's end-point */

The LineTo function draws a line from the current position up to, but not including, the point specified by the given coordinates.

Parameters

hdc

Identifies a device context.

nXEnd

Specifies the x-coordinate of the line's end-point.

nYEnd

Specifies the y-coordinate of the line's end-point.

Return Value

The return value is TRUE if the line is drawn. Otherwise, it is FALSE.

Comments

The coordinates of the line's end-point are specified in logical units.

The line is drawn using the current pen (and the current brush if the pen is a geometric pen).

The current position is set to the specified end-point if the function is successful.

See Also

MoveToEx, Polyline, PolylineTo