Simulation support:

This function is simulated by a handling routine in the graphics engine.

Description

GreQueryHWPaletteInfo fills a buffer with the RGB value information from the hardware palette. The order of the returned values is the same as the hardware. Both RGB values and the user defined xxxxx are returned. If cclr=0, only the size required for the buffer referenced by pclr is returned. The information returned can be used to create a palette. This allows a caller to create the same palette in another device context.

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 table of RGB2 palette entries. */
PVOID     pInstance;  /*  Pointer to instance data. */
ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryHWPaletteInfo. */
BOOL      fSuccess;   /*  Return codes. */

fSuccess = GreQueryHWPaletteInfo(hdc, ulStart,
             cclr, pclr, pInstance, lFunction);


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