GpiQueryClipRegion: Difference between revisions
Appearance
Created page with "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..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ;hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | |||
==Return Value== | ==Return Value== | ||
; hrgn ([[HRGN]]) - returns | ;hrgn ([[HRGN]]) - returns: Clip-region handle (if any). | ||
: Clip-region handle (if any). | :: NULLHANDLE - Null handle (no region is selected) | ||
: | :: HRGN_ERROR - Error | ||
:: Otherwise - Clip region handle. | |||
: | |||
:: | |||
==Remarks== | ==Remarks== | ||
| Line 23: | Line 18: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError: | Possible returns from WinGetLastError: | ||
; PMERR_INV_HPS (0x207F) | ; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified. | ||
: 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. | ||
; PMERR_PS_BUSY (0x20F4) | |||
: An attempt was made to access the presentation space from more than one thread simultaneously. | |||
==Example Code== | ==Example Code== | ||
This example uses GpiQueryClipRegion to return the handle of the currently selected clip region. | This example uses GpiQueryClipRegion to return the handle of the currently selected clip region. | ||
<pre> | <pre> | ||
#define INCL_GPIREGIONS /* Region functions */ | #define INCL_GPIREGIONS /* Region functions */ | ||
#include | #include <os2.h> | ||
HPS hps; /* Presentation-space handle */ | HPS hps; /* Presentation-space handle */ | ||
Latest revision as of 00:39, 17 November 2025
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);