LineTo

Syntax

BOOL LineTo(hDC,X,Y)

This function draws a line from the current position up to, but not including, the point specified by the X and Y parameters. The line is drawn with the selected pen. If no error occurs, the position is set to (X,Y).

Parameter Type/Description  

hDC HDC Identifies the device context.  
X int Specifies the logical x-coordinate of the endpoint for the line.  
Y int Specifies the logical y-coordinate of the endpoint for the line.  

Return Value

The return value specifies whether or not the line is drawn. It is nonzero if the line is drawn. Otherwise, it is zero.