Jump to content

GpiQueryClipRegion

From EDM2

This function returns the handle of the currently selected clip region.

Syntax

GpiQueryClipRegion(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

hrgn (HRGN) - returns
Clip-region handle (if any).
NULLHANDLE - Null handle (no region is selected)
HRGN_ERROR - Error
Otherwise - Clip region handle.

Remarks

If there is no currently selected clip region, a null handle is returned.

Errors

Possible returns from WinGetLastError:

PMERR_INV_HPS (0x207F)
An invalid presentation-space handle was specified.
PMERR_PS_BUSY (0x20F4)
An attempt was made to access the presentation space from more than one thread simultaneously.

Example Code

This example uses GpiQueryClipRegion to return the handle of the currently selected clip region.

#define INCL_GPIREGIONS /* Region functions */
#include <os2.h>

HPS hps; /* Presentation-space handle */
HRGN hrgn; /* clip region handle */

hrgn = GpiQueryClipRegion(hps);