BOOL OffsetWindowOrgEx(hdc, nX, nY, lpPoint) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nX; | /* logical units to add to x-coordinate | */ | |||
int nY; | /* logical units to add to y-coordinate | */ | |||
POINT FAR* lpPoint; | /* address of POINT structure | */ |
The OffsetWindowOrgEx function modifies the viewport origin relative to the current values. The formulas are written as follows:
xNewWO = xOldWO + X
yNewWO = yOldWO + Y
The new origin is the sum of the current origin and the nX and nY values.
hdc
Identifies the device context.
nX
Specifies the number of logical units to add to the current origin's x-coordinate.
nY
Specifies the number of logical units to add to the current origin's y-coordinate.
lpPoint
Points to a POINT structure. The previous window origin (in logical coordinates) is placed in this structure. If lpPoint is NULL, the previous origin is not returned.
The return value is nonzero if the function is successful. Otherwise, it is zero.