Jump to content

GpiQueryNumberSetIds

From EDM2

This function returns the number of local identifiers (lcids) currently in use, referring to fonts or bit maps.

Syntax

GpiQueryNumberSetIds(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

lCount (LONG) - returns
Number of lcids.
>=0 - Number of lcids in use
GPI_ALTERROR - Error.

Remarks

LCID_DEFAULT is included if the default font has been changed (see GpiCreateLogFont). The information returned by this call can be used to perform a subsequent GpiQuerySetIds request.

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 GpiQueryNumberSetIds to return the number of local identifiers in use (font and bit map).

#define INCL_GPILCIDS /* Font functions */
#include <os2.h>

LONG lCount; /* number of lcid's */
HPS hps; /* Presentation-space handle */

lCount = GpiQueryNumberSetIds(hps);