GpiQueryPS: Difference between revisions
Appearance
Created page with "This function returns page parameters for the presentation space. ==Syntax== lOptions = GpiQueryPS(HPS ''hps'', PSIZEL ''psizlSize'') ==Parameters== ;''hps'' (HPS) - input..." |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This function returns page parameters for the presentation space. | This function returns page parameters for the presentation space. | ||
==Syntax== | ==Syntax== | ||
GpiQueryPS(hps, psizlSize) | |||
==Parameters== | ==Parameters== | ||
;''hps'' (HPS) - input | ;''hps'' ([[HPS]]) - input:Presentation-space handle. | ||
:Presentation-space handle. | ;''psizlSize'' (P[[SIZEL]]) - output:Presentation-page size. | ||
;''psizlSize'' ( | |||
:Presentation-page size. | |||
==Returns== | ==Returns== | ||
;''lOptions'' (ULONG) - returns | ;''lOptions'' (ULONG) - returns:Presentation-space options. | ||
:Presentation-space options. | :For details, see the [[GpiCreatePS]] function. | ||
:For details, see the GpiCreatePS function. | |||
:The individual fields of the presentation-space options can be extracted by ANDing the returned value with the appropriate constant. | :The individual fields of the presentation-space options can be extracted by ANDing the returned value with the appropriate constant. | ||
:The PS_ASSOCIATE field of flOptions (see GpiCreatePS) should not be used on this function. The value of this field is not necessarily the same value that is specified when the presentation space is created. | :The PS_ASSOCIATE field of flOptions (see GpiCreatePS) should not be used on this function. The value of this field is not necessarily the same value that is specified when the presentation space is created. | ||
: | ::PS_UNITS : Presentation-space size units | ||
::PS_FORMAT : Presentation-space coordinate format | |||
: | ::PS_TYPE : Presentation-space type | ||
::PS_MODE : Presentation-space mode. | |||
: | |||
: | |||
==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== | ||
In this example we query the presentation space that corresponds to handle hps. | In this example we query the presentation space that corresponds to handle hps. | ||
<pre> | <pre> | ||
#define INCL_GPICONTROL | #define INCL_GPICONTROL | ||
#include < | #include <os2.h> | ||
HPS hps; | HPS hps; | ||
SIZEL sizel; | SIZEL sizel; |
Latest revision as of 23:56, 23 April 2025
This function returns page parameters for the presentation space.
Syntax
GpiQueryPS(hps, psizlSize)
Parameters
Returns
- lOptions (ULONG) - returns
- Presentation-space options.
- For details, see the GpiCreatePS function.
- The individual fields of the presentation-space options can be extracted by ANDing the returned value with the appropriate constant.
- The PS_ASSOCIATE field of flOptions (see GpiCreatePS) should not be used on this function. The value of this field is not necessarily the same value that is specified when the presentation space is created.
- PS_UNITS : Presentation-space size units
- PS_FORMAT : Presentation-space coordinate format
- PS_TYPE : Presentation-space type
- PS_MODE : Presentation-space mode.
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
In this example we query the presentation space that corresponds to handle hps.
#define INCL_GPICONTROL #include <os2.h> HPS hps; SIZEL sizel; GpiQueryPS(hps, &sizel);