OffsetViewportOrgEx

The OffsetViewportOrgEx function modifies the viewport origin for a device context using the specified horizontal and vertical offsets.

BOOL OffsetViewportOrgEx(
  HDC hdc,       // handle to device context
  int nXOffset,  // horizontal offset
  int nYOffset,  // vertical offset
  LPPOINT lpPoint 
                 // pointer to structure receiving original origin
);
 

Parameters

hdc
Handle to the device context.
nXOffset
Specifies the horizontal offset, in device units.
nYOffset
Specifies the vertical offset, in device units.
lpPoint
Pointer to a POINT structure. The previous viewport origin, in device units, is placed in this structure. If lpPoint is NULL, the previous viewport origin 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 new origin is the sum of the current origin and the horizontal and vertical offsets.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Coordinate Spaces and Transformations Overview, Coordinate Space and Transformation Functions, GetViewportOrgEx, OffsetWindowOrgEx, SetViewportOrgEx