GreQueryBitmapHandle: Difference between revisions
Appearance
Created page with "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. T..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
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. | 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. | This function is supported by the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreQueryBitmapHandle(hdc, lLcid, pInstance, lFunction) | GreQueryBitmapHandle(hdc, lLcid, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;lLcid (LONG) - input:Local identifier for which the bit-map handle is required. | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
;lLcid (LONG) - input | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreQueryBitmapHandle. | ||
: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== | ==Return Code== | ||
;rc (HBITMAP) - returns | ;rc (HBITMAP) - returns:Return codes. | ||
: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: | |||
:This function returns the bit-map handle (hbm), or it returns GPI_ERROR if an error occurs. | :*PMERR_BITMAP_NOT_SELECTED | ||
:*PMERR_HDC_BUSY | |||
:Possible Errors Detected: | :*PMERR_INV_HDC | ||
:*PMERR_INV_SETID | |||
:*PMERR_BITMAP_NOT_SELECTED | :Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation. | ||
:*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== | ==Sample Code== | ||
Line 45: | Line 33: | ||
HBITMAP rc; /* Return codes. */ | HBITMAP rc; /* Return codes. */ | ||
rc = GreQueryBitmapHandle(hdc, lLcid, pInstance, | rc = GreQueryBitmapHandle(hdc, lLcid, pInstance, lFunction); | ||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 23:15, 24 March 2020
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
#define INCL_GRE_LCID #include <os2.h> 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);