GreSetBitmapID: Difference between revisions
Appearance
Created page with "GreSetBitmapID sets the local identifier (lcid) for a bit map. This function is supported by the graphics engine. ==Syntax== GreSetBitmapID(hdc, hbm, lLcid, pInstance, l..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreSetBitmapID sets the local identifier (lcid) for a bit map. | GreSetBitmapID sets the local identifier (lcid) for a bit map. | ||
This function is supported by the graphics engine. | This function is supported by the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreSetBitmapID(hdc, hbm, lLcid, pInstance, lFunction) | |||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;hbm (HBITMAP) - input:Bit-map handle. | ||
;lLcid (LONG) - input:Local identifier to be associated with the bit map. | |||
;hbm (HBITMAP) - input | ;pInstance (PVOID) - input:Pointer to instance data. | ||
:Bit-map handle. | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreSetBitmapID. | ||
;lLcid (LONG) - input | |||
:Local identifier to be associated with the bit map. | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreSetBitmapID. | |||
==Return Code== | ==Return Code== | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns:Return codes. | ||
:Return codes. | :On completion, the handling routine must return BOOLEAN (fSuccess). | ||
:*TRUE Successful | |||
:On completion, the handling routine must return BOOLEAN (fSuccess). | :*FALSE Error | ||
:*TRUE Successful | :Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include: | ||
:*FALSE Error | :*PMERR_BITMAP_IS_SELECTED | ||
:*PMERR_HBITMAP_BUSY | |||
:Possible Errors Detected: | :*PMERR_HDC_BUSY | ||
:*PMERR_INV_HBITMAP | |||
:*PMERR_BITMAP_IS_SELECTED | :*PMERR_INV_HDC | ||
:*PMERR_HBITMAP_BUSY | :Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation. | ||
:*PMERR_HDC_BUSY | |||
:*PMERR_INV_HBITMAP | |||
:*PMERR_INV_HDC | |||
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | |||
==Remarks== | ==Remarks== | ||
The presentation driver must assign an lcid before the bit map can be used for area shading or as the pattern in a BitBlt operation. The bit map can be of any format supported by the device. However, it can be simplified by the graphics engine before use. | The presentation driver must assign an lcid before the bit map can be used for area shading or as the pattern in a BitBlt operation. The bit map can be of any format supported by the device. However, it can be simplified by the graphics engine before use. | ||
Errors are raised by the graphics engine when: | Errors are raised by the graphics engine when: | ||
*The local identifier is already in use. | *The local identifier is already in use. | ||
*The bit map is already selected into a memory DC. | *The bit map is already selected into a memory DC. | ||
;Note: When a bit map is destroyed, its lcid becomes undefined. | ;Note: When a bit map is destroyed, its lcid becomes undefined. | ||
<PRE> | <PRE> | ||
#define INCL_GRE_LCID | #define INCL_GRE_LCID | ||
Line 60: | Line 45: | ||
BOOL rc; /* Return codes. */ | BOOL rc; /* Return codes. */ | ||
rc = GreSetBitmapID(hdc, hbm, lLcid, pInstance, | rc = GreSetBitmapID(hdc, hbm, lLcid, pInstance, lFunction); | ||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 16:15, 29 February 2020
GreSetBitmapID sets the local identifier (lcid) for a bit map.
This function is supported by the graphics engine.
Syntax
GreSetBitmapID(hdc, hbm, lLcid, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- hbm (HBITMAP) - input
- Bit-map handle.
- lLcid (LONG) - input
- Local identifier to be associated with the bit map.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreSetBitmapID.
Return Code
- rc (BOOL) - returns
- Return codes.
- On completion, the handling routine must return BOOLEAN (fSuccess).
- TRUE Successful
- FALSE Error
- 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_IS_SELECTED
- PMERR_HBITMAP_BUSY
- PMERR_HDC_BUSY
- PMERR_INV_HBITMAP
- PMERR_INV_HDC
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Remarks
The presentation driver must assign an lcid before the bit map can be used for area shading or as the pattern in a BitBlt operation. The bit map can be of any format supported by the device. However, it can be simplified by the graphics engine before use.
Errors are raised by the graphics engine when:
- The local identifier is already in use.
- The bit map is already selected into a memory DC.
- Note
- When a bit map is destroyed, its lcid becomes undefined.
#define INCL_GRE_LCID #include <os2.h> HDC hdc; /* Device context handle. */ HBITMAP hbm; /* Bit-map handle. */ LONG lLcid; /* Local identifier to be associated with the bit map. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreSetBitmapID. */ BOOL rc; /* Return codes. */ rc = GreSetBitmapID(hdc, hbm, lLcid, pInstance, lFunction);