Click to Rate and Give Feedback
MSDN
MSDN Library
Windows GDI
Lines and Curves
 MoveToEx
Windows GDI
MoveToEx

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

BOOL MoveToEx(
  HDC hdc,          // handle to device context
  int X,            // x-coordinate of new current position
  int Y,            // y-coordinate of new current position
  LPPOINT lpPoint   // old current position
);

Parameters

hdc
[in] Handle to a device context.
X
[in] Specifies the x-coordinate, in logical units, of the new position, in logical units.
Y
[in] Specifies the y-coordinate, in logical units, of the new position, in logical units.
lpPoint
[out] 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 Values

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.

Example Code

For an example, see Drawing Markers.

Requirements

  Windows NT/2000/XP/Vista: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Wingdi.h; include Windows.h.
  Library: Use Gdi32.lib.

See Also

Lines and Curves Overview, Line and Curve Functions, AngleArc, LineTo, POINT, PolyBezierTo, PolylineTo


Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker