SetViewportOrgEx

3.1

  BOOL SetViewportOrgEx(hdc, nX, nY, lpPoint)    
  HDC hdc; /* handle of device context */
  int nX; /* x-coordinate of new origin */
  int nY; /* y-coordinate of new origin */
  POINT FAR* lpPoint; /* address of struct. with prev. origin */

The SetViewportOrgEx function sets the viewport origin of the specified device context. The viewport, along with the window, defines how points are mapped from logical coordinates to device coordinates.

Parameters

hdc

Identifies the device context.

nX

Specifies the x-coordinate, in device units, of the origin of the viewport.

nY

Specifies the y-coordinate, in device units, of the origin of the viewport.

lpPoint

Points to a POINT structure. The previous origin of the viewport, in device coordinates, is placed in this structure. If lpPoint is NULL, nothing is returned. The POINT structure has the following form:

typedef struct tagPOINT {   /* pt */
   int x;
   int y;
} POINT;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

See Also

SetWindowOrgEx