Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Draws a line from the current position up to, but not including, the point specified by x and y (or point).

BOOL LineTo( 
   int x, 
   int y  
BOOL LineTo( 
   POINT point  


Specifies the logical x-coordinate of the endpoint for the line.


Specifies the logical y-coordinate of the endpoint for the line.


Specifies the endpoint for the line. You can pass either a POINT structure or a CPoint object for this parameter.

Nonzero if the line is drawn; otherwise 0.

The line is drawn with the selected pen. The current position is set to x,y or to point.

See the example for CRect::CenterPoint.

Header: afxwin.h

© 2015 Microsoft