GreSaveXformData: Difference between revisions
Appearance
Created page with "GreSaveXformData stores the current transform state in pBuffer. This function can be hooked by the presentation driver. ;Simulation support: This function is simulated by ..." |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
GreSaveXformData stores the current transform state in pBuffer. | GreSaveXformData stores the current transform state in pBuffer. | ||
This function can be hooked by the presentation driver. | This function can be hooked by the presentation driver. | ||
;Simulation support: This function is simulated by a handling routine in the graphics engine. | ;Simulation support: This function is simulated by a handling routine in the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreSaveXformData(hdc, ulSize, pInstance, lFunction) | GreSaveXformData(hdc, ulSize, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;ulSize (ULONG) - input:Size in bytes required for pBuffer. | ||
:Can be specified as 0. In this case, the function returns the size of the transform data: | |||
;ulSize (ULONG) - input | |||
:Size in bytes required for pBuffer. | |||
:Can be specified as 0. In this case, the function returns the size of the transform data: | |||
ulSize=GreSaveXformData (hdc, 0, 0); /* Find out how large the buffer must be, */ | ulSize=GreSaveXformData (hdc, 0, 0); /* Find out how large the buffer must be, */ | ||
GreSaveXformData (hdc, ulSize, pBuffer); /* then save the transform state. */ | GreSaveXformData (hdc, ulSize, pBuffer); /* then save the transform state. */ | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
;pInstance (PVOID) - input | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreSaveXformData. | ||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreSaveXformData. | |||
==Return Code== | ==Return Code== | ||
;rc (ULONG) - returns | ;rc (ULONG) - returns:Return codes. | ||
: | :When called with ulSize specified as 0, it returns the size of the buffer required to save the transform state. Otherwise, it returns GPI_OK to indicate a successful completion. In either case, GPI_ERROR is returned to indicate failure. | ||
: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_HDC_BUSY | |||
:*PMERR_INV_HDC | |||
:*PMERR_INV_LENGTH_OR_COUNT | |||
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation. | |||
==Declaration== | |||
== | |||
<PRE> | <PRE> | ||
#define INCL_GRE_XFORMS | #define INCL_GRE_XFORMS | ||
Line 51: | Line 38: | ||
rc = GreSaveXformData(hdc, ulSize, pInstance, lFunction); | rc = GreSaveXformData(hdc, ulSize, pInstance, lFunction); | ||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 23:18, 23 March 2020
GreSaveXformData stores the current transform state in pBuffer.
This function can be hooked by the presentation driver.
- Simulation support
- This function is simulated by a handling routine in the graphics engine.
Syntax
GreSaveXformData(hdc, ulSize, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- ulSize (ULONG) - input
- Size in bytes required for pBuffer.
- Can be specified as 0. In this case, the function returns the size of the transform data:
ulSize=GreSaveXformData (hdc, 0, 0); /* Find out how large the buffer must be, */ GreSaveXformData (hdc, ulSize, pBuffer); /* then save the transform state. */
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreSaveXformData.
Return Code
- rc (ULONG) - returns
- Return codes.
- When called with ulSize specified as 0, it returns the size of the buffer required to save the transform state. Otherwise, it returns GPI_OK to indicate a successful completion. In either case, GPI_ERROR is returned to indicate failure.
- 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_HDC_BUSY
- PMERR_INV_HDC
- PMERR_INV_LENGTH_OR_COUNT
- Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.
Declaration
#define INCL_GRE_XFORMS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG ulSize; /* Size in bytes required for pBuffer. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreSaveXformData. */ ULONG rc; /* Return codes. */ rc = GreSaveXformData(hdc, ulSize, pInstance, lFunction);