GreGetHandle: Difference between revisions
Appearance
Created page with "GreGetHandle returns the handle or variable (stored in the DC corresponding to iIndex) previously set by GreSetHandle. This function is supported by the graphics engine. =..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreGetHandle returns the handle or variable (stored in the DC corresponding to iIndex) previously set by GreSetHandle. | GreGetHandle returns the handle or variable (stored in the DC corresponding to iIndex) previously set by GreSetHandle. | ||
This function is supported by the graphics engine. | This function is supported by the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreGetHandle(hdc, iIndex, pInstance, lFunction) | GreGetHandle(hdc, iIndex, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;iIndex (ULONG) - input:Index value. | ||
:Index value of the returned handle in the range 0 - 3. A value of 1 can be used to get the associated AVIO presentation space handle. | |||
;iIndex (ULONG) - input | ;pInstance (PVOID) - input:Pointer to instance data. | ||
:Index value. | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreGetHandle. | ||
:Index value of the returned handle in the range 0 - 3. A value of 1 can be used to get the associated AVIO presentation space handle. | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreGetHandle. | |||
==Return Code== | ==Return Code== | ||
;rc (LONG) - returns | ;rc (LONG) - returns:Return code. | ||
:Return code. | :On completion, the graphics engine returns the handle requested hHandle), or GPI_ALTERROR if an error occurs. | ||
:Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include: | |||
:On completion, the graphics engine returns the handle requested hHandle), or GPI_ALTERROR if an error occurs. | :*PMERR_HDC_BUSY | ||
:*PMERR_INV_HDC | |||
:Possible Errors Detected: | :Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation. | ||
:*PMERR_HDC_BUSY | |||
:*PMERR_INV_HDC | |||
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | |||
==Sample Code== | ==Sample Code== |
Latest revision as of 04:49, 24 March 2020
GreGetHandle returns the handle or variable (stored in the DC corresponding to iIndex) previously set by GreSetHandle.
This function is supported by the graphics engine.
Syntax
GreGetHandle(hdc, iIndex, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- iIndex (ULONG) - input
- Index value.
- Index value of the returned handle in the range 0 - 3. A value of 1 can be used to get the associated AVIO presentation space handle.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreGetHandle.
Return Code
- rc (LONG) - returns
- Return code.
- On completion, the graphics engine returns the handle requested hHandle), or GPI_ALTERROR if an error occurs.
- 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_HDC_BUSY
- PMERR_INV_HDC
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Sample Code
#define INCL_GRE_DCS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG iIndex; /* Index value. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreGetHandle. */ LONG rc; /* Return code. */ rc = GreGetHandle(hdc, iIndex, pInstance, lFunction);