CDC::LineTo

This method draws a line from the current position to, but not including, the point specified by x and y or point. The line is drawn with the selected pen. The current position is set to x,y or to point.

BOOL LineTo(
int x,
int y );

BOOL LineTo(
POINT point ); 

Parameters

  • x
    The logical x-coordinate of the endpoint for the line.
  • y
    The logical y-coordinate of the endpoint for the line.
  • point
    The endpoint for the line. You can pass a POINT structure or a CPoint object for this parameter.

Return Value

Nonzero if the line is drawn; otherwise, it is zero.

Example

See the example for CRect::CenterPoint

Requirements

**  Windows CE versions:** 1.0 and later
  Header file: Declared in Afxwin.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

CDC::MoveTo, CDC::GetCurrentPosition, CPoint, POINT