GreQueryPaletteRealization: Difference between revisions
Appearance
Created page with "GreQueryPaletteRealization returns the mapping from the logical palette in the device context to the HW palette as an array of ULONGs. This is done by logically type-casting t..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreQueryPaletteRealization returns the mapping from the logical palette in the device context to the HW palette as an array of ULONGs. This is done by logically type-casting the index in the hardware palette to a ULONG. GreQueryPaletteRealization gives applications the ability to predict the outcome of color mixing operations. | GreQueryPaletteRealization returns the mapping from the logical palette in the device context to the HW palette as an array of ULONGs. This is done by logically type-casting the index in the hardware palette to a ULONG. GreQueryPaletteRealization gives applications the ability to predict the outcome of color mixing operations. | ||
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 Revision 2.0 (or later) of the graphics engine. | ;Simulation support: This function is simulated by a handling routine in Revision 2.0 (or later) of the graphics engine. | ||
== Syntax == | == Syntax == | ||
GreQueryPaletteRealization(hdc, ulStart, cclr, pclr, pInstance, lFunction) | GreQueryPaletteRealization(hdc, ulStart, cclr, pclr, pInstance, lFunction) | ||
== Parameters == | == Parameters == | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;ulStart (ULONG) - input:Starting index, first palette entry to query. | ||
;cclr (ULONG) - input:Count of palette entries. | |||
;ulStart (ULONG) - input | ;pclr (PULONG) - input:Pointer to an array of ULONGs. | ||
:Starting index, first palette entry to query. | ;pInstance (PVOID) - input:Pointer to instance data. | ||
;lFunction (ULONG) - input:HHigh-order WORD=flags; low-order WORD=NGreQueryPaletteRealization. | |||
;cclr (ULONG) - input | |||
:Count of palette entries. | |||
;pclr (PULONG) - input | |||
:Pointer to an array of ULONGs. | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:HHigh-order WORD=flags; low-order WORD=NGreQueryPaletteRealization. | |||
== Returns == | == Returns == | ||
;rc (ULONG) - returns | ;rc (ULONG) - returns:Return codes. | ||
:Return codes. | :This function returns the count of the palette entries. | ||
: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: | |||
:This function returns the count of the palette entries. | :PMERR_INV_DC | ||
: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_DC | |||
== Sample == | == Sample == | ||
Line 52: | Line 37: | ||
rc = GreQueryPaletteRealization(hdc, ulStart, | rc = GreQueryPaletteRealization(hdc, ulStart, | ||
cclr, pclr, pInstance, lFunction); | cclr, pclr, pInstance, lFunction); | ||
</pre> | </pre> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 01:03, 25 March 2020
GreQueryPaletteRealization returns the mapping from the logical palette in the device context to the HW palette as an array of ULONGs. This is done by logically type-casting the index in the hardware palette to a ULONG. GreQueryPaletteRealization gives applications the ability to predict the outcome of color mixing operations.
This function can be hooked by the presentation driver.
- Simulation support
- This function is simulated by a handling routine in Revision 2.0 (or later) of the graphics engine.
Syntax
GreQueryPaletteRealization(hdc, ulStart, cclr, pclr, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- ulStart (ULONG) - input
- Starting index, first palette entry to query.
- cclr (ULONG) - input
- Count of palette entries.
- pclr (PULONG) - input
- Pointer to an array of ULONGs.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- HHigh-order WORD=flags; low-order WORD=NGreQueryPaletteRealization.
Returns
- rc (ULONG) - returns
- Return codes.
- This function returns the count of the palette entries.
- 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_DC
Sample
#define INCL_GRE_PALETTE #include <os2.h> HDC hdc; /* Device context handle. */ ULONG ulStart; /* Starting index, first palette entry to query. */ ULONG cclr; /* Count of palette entries. */ PULONG pclr; /* Pointer to an array of ULONGs. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* HHigh-order WORD=flags; low-order WORD=NGreQueryPaletteRealization. */ ULONG rc; /* Return codes. */ rc = GreQueryPaletteRealization(hdc, ulStart, cclr, pclr, pInstance, lFunction);