The SetViewportExtEx function sets the horizontal and vertical extents of the viewport for a device context by using the specified values.
BOOL SetViewportExtEx( HDC hdc, int x, int y, LPSIZE lpsz );
A handle to the device context.
The horizontal extent, in device units, of the viewport.
The vertical extent, in device units, of the viewport.
A pointer to a SIZE structure that receives the previous viewport extents, in device units. If lpSize is NULL, this parameter is not used.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
The viewport refers to the device coordinate system of the device space. The extent is the maximum value of an axis. This function sets the maximum values for the horizontal and vertical axes of the viewport in device coordinates (or pixels). When mapping between page space and device space, SetWindowExtEx and SetViewportExtEx determine the scaling factor between the window and the viewport. For more information, see Transformation of Coordinate Spaces.
When the following mapping modes are set, calls to the SetWindowExtEx and SetViewportExtEx functions are ignored.
For an example, see Invalidating the Client Area.
|Windows version||Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|