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.
GpiSetRegion (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIREGIONS
 
BOOL GpiSetRegion(hps, hrgn, crcl, arcl)
HPS hps;        /* presentation-space handle                */
HRGN hrgn;      /* region handle                            */
LONG crcl;      /* number of rectangles                     */
PRECTL arcl;    /* address of array of rectangle structures */
 
The GpiSetRegion function redefines the region specified by the hrgn
parameter. The function replaces the old region by creating a region that
consists of the union of the rectangles pointed to by the arcl parameter.
This function is similar to the GpiCreateRegion function.
 
The function can be used only if a device context is associated with the
presentation space.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
hrgn       Identifies the region handle.
 
crcl       Specifies the number of rectangles to use to create the new
           region. If it is zero, the function creates an empty region and
           the arcl parameter is ignored.
 
arcl       Points to the array of RECTL structures that contains the
           rectangles for the replacement region. The array must have the
           number of elements specified by crcl.
 
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
one of the following:
 
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_INV_HRGN
     PMERR_INV_LENGTH_OR_COUNT
     PMERR_INV_RECT
     PMERR_PS_BUSY
 
See Also
 
GpiCombineRegion, GpiCreateRegion, RECTL