GreDeviceSelectBitmap: Difference between revisions
Appearance
Created page with "GreDeviceSelectBitmap informs the presentation driver that a new bit map is selected into the device context. See also GreSelectBitmap. This function must be supported by th..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreDeviceSelectBitmap informs the presentation driver that a new bit map is selected into the device context. See also GreSelectBitmap. | GreDeviceSelectBitmap informs the presentation driver that a new bit map is selected into the device context. See also [[GreSelectBitmap]]. | ||
This function must be supported by the presentation driver. | This function must be supported by the presentation driver. | ||
; Simulation support: None. This function is mandatory for all drivers. | ;Simulation support: None. This function is mandatory for all drivers. | ||
== Syntax == | == Syntax == | ||
GreDeviceSelectBitmap(hdc, hbm, pInstance, lFunction) | GreDeviceSelectBitmap(hdc, hbm, pInstance, lFunction) | ||
== Parameters == | == Parameters == | ||
; hdc (HDC) - input : Device context handle. | ;hdc (HDC) - input: Device context handle. | ||
;hbm (ULONG) - input: Device bit-map handle. | |||
; hbm (ULONG) - input : Device bit-map handle. | ;pInstance (PVOID) - input: Pointer to instance data. | ||
;lFunction (ULONG) - input: High-order WORD=flags; low-order WORD=NGreDeviceSelectBitmap. | |||
; pInstance (PVOID) - input : Pointer to instance data. | |||
; lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreDeviceSelectBitmap. | |||
== Returns == | == Returns == | ||
; rc (BOOL) - returns : Return Codes. | ;rc (BOOL) - returns : Return Codes. | ||
:On completion, the handling routine must return a BOOLEAN value to indicate success or an error. | |||
On completion, the handling routine must return a BOOLEAN value to indicate success or an error. | * TRUE Successful | ||
* TRUE Successful | * FALSE Error | ||
* FALSE Error | Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | ||
* PMERR_DEV_FUNC_NOT_INSTALLED | |||
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | * PMERR_INV_HDC | ||
* PMERR_DEV_FUNC_NOT_INSTALLED | Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation. | ||
* PMERR_INV_HDC | |||
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation. | |||
== Sample == | == Sample == |
Latest revision as of 00:07, 24 March 2020
GreDeviceSelectBitmap informs the presentation driver that a new bit map is selected into the device context. See also GreSelectBitmap.
This function must be supported by the presentation driver.
- Simulation support
- None. This function is mandatory for all drivers.
Syntax
GreDeviceSelectBitmap(hdc, hbm, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- hbm (ULONG) - input
- Device bit-map handle.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreDeviceSelectBitmap.
Returns
- rc (BOOL) - returns
- Return Codes.
- On completion, the handling routine must return a BOOLEAN value to indicate success or an error.
- TRUE Successful
- FALSE Error
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_DEV_FUNC_NOT_INSTALLED
- PMERR_INV_HDC
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.
Sample
#define INCL_GRE_BITMAPS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG hbm; /* Device bit-map handle. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; BOOL rc; /* Return Codes. */ rc = GreDeviceSelectBitmap(hdc, hbm, pInstance, lFunction);