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.
GpiSetClipRegion (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIREGIONS
LONG GpiSetClipRegion(hps, hrgn, phrgn)
HPS hps; /* presentation-space handle */
HRGN hrgn; /* region handle */
PHRGN phrgn; /* address of variable for previous region handle */
The GpiSetClipRegion function sets the clip region. The clip region
specifies a region in device space that the system uses to clip output. The
clip region includes all points inside and on the boundary of the region
specified by hrgn. Since the region coordinates are assumed to be device
coordinates, no conversion is applied.
The function creates the clip region by releasing the previous clip region,
copying the handle of this region to the variable pointed to by phrgn, and
setting the specified region as the clip region. Once a region is set as the
clip region, it cannot be used in subsequent region operations. Once
released from the clipping region, a region can be used again to restore the
previous clip region.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space. The presentation space must be
currently associated with the device context for which the
specified regions were created.
hrgn Identifies the region. If the hrgn parameter is NULL, the
function releases any previous clip region and sets no clip
region.
phrgn Points to the variable that receives the handle of the previous
region. If no previous clip region exists, the function copies
NULL to the variable.
Return Value
The return value is RGN_NULL, RGN_RECT, or RGN_COMPLEX if the function is
successful, or RGN_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
See Also
GpiCreateRegion, GpiOffsetClipRegion
♦