GreSetBitmapDimension: Difference between revisions
Appearance
Created page with "GreSetBitmapDimension associates height and width values for the bit map indicated by hbm. These values can be read back later by calling GreGetBitmapDimension. This functio..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreSetBitmapDimension associates height and width values for the bit map indicated by hbm. These values can be read back later by calling GreGetBitmapDimension. | GreSetBitmapDimension associates height and width values for the bit map indicated by hbm. These values can be read back later by calling [[GreGetBitmapDimension]]. | ||
This function is supported by the graphics engine. | This function is supported by the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreSetBitmapDimension(hbm, pDimension, pInstance, lFunction) | |||
==Parameters== | ==Parameters== | ||
;hbm (HBITMAP) - input | ;hbm (HBITMAP) - input:Bit-map handle. | ||
:Bit-map handle. | ;pDimension (P[[SIZEL]]) - input:Pointer to width and height values in 0.1mm units. | ||
:Pointer to a pair of parameters: | |||
;pDimension ( | ::ulWidth Width of bit map in 0.1mm units | ||
:Pointer to width and height values in 0.1mm units. | ::ulHeight Height of bit map in 0.1mm units | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
:Pointer to a pair of parameters: | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreSetBitmapDimension. | ||
:ulHeight Height of bit map in 0.1mm units | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreSetBitmapDimension. | |||
==Return Code== | ==Return Code== | ||
;fSuccess (BOOL) - returns | ;fSuccess (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_INV_HBITMAP | ||
:*PMERR_BITMAP_IS_SELECTED | :Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation. | ||
:*PMERR_HBITMAP_BUSY | |||
:*PMERR_INV_HBITMAP | |||
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | |||
==Sample Code== | ==Sample Code== | ||
Line 50: | Line 37: | ||
BOOL fSuccess; /* Return codes. */ | BOOL fSuccess; /* Return codes. */ | ||
fSuccess = GreSetBitmapDimension(hbm, pDimension, | fSuccess = GreSetBitmapDimension(hbm, pDimension, pInstance, lFunction); | ||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 23:45, 23 March 2020
GreSetBitmapDimension associates height and width values for the bit map indicated by hbm. These values can be read back later by calling GreGetBitmapDimension.
This function is supported by the graphics engine.
Syntax
GreSetBitmapDimension(hbm, pDimension, pInstance, lFunction)
Parameters
- hbm (HBITMAP) - input
- Bit-map handle.
- pDimension (PSIZEL) - input
- Pointer to width and height values in 0.1mm units.
- Pointer to a pair of parameters:
- ulWidth Width of bit map in 0.1mm units
- ulHeight Height of bit map in 0.1mm units
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreSetBitmapDimension.
Return Code
- fSuccess (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_INV_HBITMAP
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Sample Code
#define INCL_GRE_DEVSUPPOR #include <os2.h> HBITMAP hbm; /* Bit-map handle. */ PSIZEL pDimension; /* Pointer to width and height values in 0.1mm units. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreSetBitmapDimension. */ BOOL fSuccess; /* Return codes. */ fSuccess = GreSetBitmapDimension(hbm, pDimension, pInstance, lFunction);