Jump to content

GpiQueryBitmapHandle

From EDM2
Revision as of 00:03, 5 May 2017 by Martini (talk | contribs) (Created page with "This function returns the handle of the bit map currently tagged with the specified local identifier (lcid). ==Syntax== <PRE> hbm = GpiQueryBitmapHandle(hps, lLcid); </PRE> ==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function returns the handle of the bit map currently tagged with the specified local identifier (lcid).

Syntax

hbm = GpiQueryBitmapHandle(hps, lLcid);

Parameters

hps (HPS) - input
Presentation-space handle.
lLcid (LONG) - input
Local identifier.
It must be greater than 0 and less than 255.

Return Code

hbm (HBITMAP) - returns
Bit-map handle.
<>0 : Bit-map handle
GPI_ERROR : Error.

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.
PMERR_INV_SETID (0x20CA)
An invalid setid parameter was specified.
PMERR_ID_HAS_NO_BITMAP (0x2036)
No bit map was tagged with the setid specified on a GpiQueryBitmapHandle function.

Remarks

An error is raised if a bit map is not currently tagged with the specified lLcid .

Example Code

This example uses GpiQueryBitmapHandle to return the handle of the bit map currently tagged with the specified local identifier (lcid) set byGpiSetBitmapId.

#define INCL_GPIBITMAPS /* Bit-map functions */
#include <os2.h>

HBITMAP hbm; /* bit-map handle */
HPS hps; /* presentation-space handle */
LONG lLcid; /* local identifier */

hbm = GpiQueryBitmapHandle(hps, lLcid);

Related Functions

  • GpiSetBitmapId