次の方法で共有


LineTo (Compact 2013)

3/28/2014

This function draws a line from the current position up to, but not including, the specified point.

Syntax

WINGDIAPI BOOL WINAPI LineTo(
  HDC hdc,
  int nXEnd,
  int nYEnd
);

Parameters

  • hdc
    [in] Handle to a device context.
  • nXEnd
    [in] Integer that specifies the x-coordinate, in logical units, of the endpoint of the line.
  • nYEnd
    [in] Integer that specifies the y-coordinate, in logical units, of the endpoint of the line.

Return Value

A non-zero value indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

LineTo draws the line by using the current pen.

If LineTo succeeds, LineTo sets the current position to the specified endpoint.

If hdc specifies a mirrored device context, the horizontal coordinates increase from right-to-left rather than from left-to-right.

Requirements

Header

windows.h

Library

coredll.lib

See Also

Reference

GDI Functions
MoveToEx
Polyline