gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiSetPageViewport (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPITRANSFORMS
 
BOOL GpiSetPageViewport(hps, prclViewport)
HPS hps;                /* presentation-space handle               */
PRECTL prclViewport;    /* address of structure with page viewport */
 
The GpiSetPageViewport function sets the page viewport within device space.
The page viewport and the presentation page size (specified by the
GpiCreatePS function) specify the device transformation.
 
The function can only be used if the presentation space has an associated
device context.
 
Parameter     Description
────────────────────────────────────────────────────────────────────────────
 
hps           Identifies the presentation space.
 
prclViewport  Points to a RECTL structure defining the page viewport in
              device units.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
the following:
 
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_INV_PAGE_VIEWPORT
     PMERR_PS_BUSY
 
Comments
 
When a presentation space is associated with a device context, the system
sets a default page viewport. The default page viewport depends on the page
units selected for the presentation space.
 
See Also
 
GpiCreatePS, GpiQueryPageViewport, RECTL