GreQueryBitmapHandle

GreQueryBitmapHandle gets the bit-map handle for the specified local identifier (lcid). When lLcid does not reference a bit map, an error is raised by the graphics engine.

This function is supported by the graphics engine.

Syntax
GreQueryBitmapHandle(hdc, lLcid, pInstance, lFunction);

Parameters

 * hdc (HDC) - input
 * Device context handle.


 * lLcid (LONG) - input
 * Local identifier for which the bit-map handle is required.


 * pInstance (PVOID) - input
 * Pointer to instance data.


 * lFunction (ULONG) - input
 * High-order WORD=flags; low-order WORD=NGreQueryBitmapHandle.

Return Code

 * rc (HBITMAP) - returns
 * Return codes.


 * This function returns the bit-map handle (hbm), or it returns GPI_ERROR if an error occurs.


 * Possible Errors Detected:  When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:


 * PMERR_BITMAP_NOT_SELECTED
 * PMERR_HDC_BUSY
 * PMERR_INV_HDC
 * PMERR_INV_SETID


 * Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.

Sample Code

 * 1) define INCL_GRE_LCID
 * 2) include 

HDC       hdc;        /*  Device context handle. */ LONG      lLcid;      /*  Local identifier for which the bit-map handle is required. */ PVOID     pInstance;  /*  Pointer to instance data. */ ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryBitmapHandle. */ HBITMAP   rc;         /*  Return codes. */

rc = GreQueryBitmapHandle(hdc, lLcid, pInstance,      lFunction); 