LineTo function
Applies to: desktop apps only
The LineTo function draws a line from the current position up to, but not including, the specified point.
Syntax
BOOL LineTo( __in HDC hdc, __in int nXEnd, __in int nYEnd );
Parameters
- hdc [in]
-
Handle to a device context.
- nXEnd [in]
-
Specifies the x-coordinate, in logical units, of the line's ending point.
- nYEnd [in]
-
Specifies the y-coordinate, in logical units, of the line's ending point.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The line is drawn by using the current pen and, if the pen is a geometric pen, the current brush.
If LineTo succeeds, the current position is set to the specified ending point.
Examples
For an example, see Drawing Markers.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012