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.
GpiDestroyRegion (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIREGIONS
BOOL GpiDestroyRegion(hps, hrgn)
HPS hps; /* presentation-space handle */
HRGN hrgn; /* handle of region to destroy */
The GpiDestroyRegion function destroys the region specified by hrgn. The
function destroys the region only if the device context containing the
region is associated with the given presentation space.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
hrgn Identifies the region to destroy.
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_HPS
PMERR_INV_HRGN
PMERR_PS_BUSY
PMERR_REGION_IS_CLIP_REGION
Example
This example uses the GpiDestroyRegion function to destroy a region after
drawing a complex figure:
HRGN hrgn;
RECTL arcl[3] = { 10, 10, 20, 20, 15, 15, 25, 25, 20, 20, 30, 30 };
hrgn = GpiCreateRegion(hps, 3L, arcl); /* use 3 rectangles */
GpiPaintRegion(hps, hrgn); /* paint the region */
GpiDestroyRegion(hps, hrgn); /* destroy the region */
See Also
GpiCreateRegion, WinGetLastError
♦