Jump to content

GpiQueryPS

From EDM2

This function returns page parameters for the presentation space.

Syntax

GpiQueryPS(hps, psizlSize)

Parameters

hps (HPS) - input
Presentation-space handle.
psizlSize (PSIZEL) - output
Presentation-page size.

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);