GreSaveScreenBits: Difference between revisions
Appearance
Created page with "GreSaveScreenBits saves a rectangle of screen bits. ;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling rou..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreSaveScreenBits saves a rectangle of screen bits. | GreSaveScreenBits saves a rectangle of screen bits. | ||
;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine. | ;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreSaveScreenBits(hdc, prclRect, pInstance, lFunction) | GreSaveScreenBits(hdc, prclRect, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:The device context handle. | ||
:The device context handle. | ;prclRect (PRECTL) - input:A pointer to a screen rectangle defined in screen coordinates. | ||
;pInstance (PVOID) - input:A pointer to instance data. | |||
;prclRect (PRECTL) - input | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreRestoreScreenBits. | ||
:A pointer to a screen rectangle defined in screen coordinates. | |||
;pInstance (PVOID) - input | |||
:A pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreRestoreScreenBits. | |||
==Return Code== | ==Return Code== | ||
;rc (ULONG) - returns | ;rc (ULONG) - returns:Return codes. | ||
:Return codes. | :On completion, the handling routine must return a handle to the saved bits (hsbBits) or 0 to indicate that the bits were not saved or that an error occurred. | ||
: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: | |||
:On completion, the handling routine must return a handle to the saved bits (hsbBits) or 0 to indicate that the bits were not saved or that an error occurred. | :*PMERR_DEV_FUNC_NOT_INSTALLED | ||
:*PMERR_INV_HDC | |||
: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 | |||
==Remarks== | ==Remarks== | ||
It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine. | It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine. | ||
This function lets the user-interface routines improve the performance of dialog boxes. | This function lets the user-interface routines improve the performance of dialog boxes. | ||
==Sample Code== | ==Sample Code== |
Latest revision as of 23:28, 23 March 2020
GreSaveScreenBits saves a rectangle of screen bits.
- Simulation support
- This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.
Syntax
GreSaveScreenBits(hdc, prclRect, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- The device context handle.
- prclRect (PRECTL) - input
- A pointer to a screen rectangle defined in screen coordinates.
- pInstance (PVOID) - input
- A pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreRestoreScreenBits.
Return Code
- rc (ULONG) - returns
- Return codes.
- On completion, the handling routine must return a handle to the saved bits (hsbBits) or 0 to indicate that the bits were not saved or that an error occurred.
- 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
Remarks
It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine.
This function lets the user-interface routines improve the performance of dialog boxes.
Sample Code
#define INCL_GRE_BITMAPS #include <os2.h> HDC hdc; /* The device context handle. */ PRECTL prclRect; /* A pointer to a screen rectangle defined in screen coordinates. */ PVOID pInstance; /* A pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreRestoreScreenBits. */ ULONG rc; /* Return codes. */ rc = GreSaveScreenBits(hdc, prclRect, pInstance, lFunction);