gpi12.hlp (Table of Contents; Topic list)
GpiSetDefViewingLimits (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIDEFAULTS
 
BOOL GpiSetDefViewingLimits(hps, prclLimits)
HPS hps;              /* presentation-space handle                */
PRECTL prclLimits;    /* pointer to structure with viewing limits */
 
The GpiSetDefViewingLimits function sets the default viewing limits. The
default viewing limits define the values given to the viewing limits of a
presentation space whenever that presentation space is reset. (The viewing
limits specify a rectangle in model space that the system uses to clip
output.) A presentation space can be reset using the GpiResetPS function.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hps         Identifies the presentation space.
 
prclLimits  Points to the RECTL structure that contains the coordinates of
            the default viewing limits.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurs.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_INV_VIEWING_LIMITS
     PMERR_PS_BUSY
 
Comments
 
Setting the default viewing limits does not immediately affect the
viewing-limits parameters. The system uses the default viewing limits only
when the presentation space is reset. The default viewing limits are reset
when the presentation space is reset using the GRES_SEGMENT or GRES_ALL
options of the GpiResetPS function. The reset values for the default viewing
limits are all of model space, meaning nothing is clipped.
 
See Also
 
GpiQueryDefViewingLimits, GpiSetViewingLimits, RECTL