Simulation support:

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

Description

GreDeviceSetPaletteEntries changes the entries in a palette as a result of an application's GpiSetPalette entries request. These changes do not become apparent until an application calls WinRealizePalette. If an application wants to change its palette rapidly and makes those changes immediately apparent, it calls GpiAnimatePalette.

This function can be hooked by the presentation driver.

#define INCL_GRE_PALETTE
#include <os2.h>

HDC       hdc;        /*  Device context handle. */
ULONG     hdevpal;    /*  Device palette handle. */
ULONG     ulFormat;   /*  Specifies the entry format. Must be LCOLF_CONSECRGB. */
ULONG     ulStart;    /*  Starting index, that is, first palette entry to change. */
ULONG     cclr;       /*  Count of palette entries to change. */
PULONG    pclr;       /*  Pointer to table of new RGB2 palette entries. */
PVOID     pInstance;  /*  Pointer to instance data. */
ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreDeviceSetPaletteEntries. */
BOOL      rc;         /*  Return codes. */

rc = GreDeviceSetPaletteEntries(hdc, hdevpal,
       ulFormat, ulStart, cclr, pclr, pInstance,
       lFunction);


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