MoveToEx function (wingdi.h)

The MoveToEx function updates the current position to the specified point and optionally returns the previous position.

Syntax

BOOL MoveToEx(
  [in]  HDC     hdc,
  [in]  int     x,
  [in]  int     y,
  [out] LPPOINT lppt
);

Parameters

[in] hdc

Handle to a device context.

[in] x

Specifies the x-coordinate, in logical units, of the new position, in logical units.

[in] y

Specifies the y-coordinate, in logical units, of the new position, in logical units.

[out] lppt

Pointer to a POINT structure that receives the previous current position. If this parameter is a NULL pointer, the previous position is not returned.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The MoveToEx function affects all drawing functions.

Examples

For an example, see Drawing Markers.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

AngleArc

Line and Curve Functions

LineTo

Lines and Curves Overview

POINT

PolyBezierTo

PolylineTo