Simulation support:

This function is simulated by a handling routine in Revision 2.0 (or later) of the graphics engine.

Description

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.

#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);


[Back: GreQueryPaletteRealization]
[Next: GreQueryPaletteRealization Parameter - hdc]