Jump to content

GreDeviceSetPaletteEntries

From EDM2

GreDeviceSetPaletteEntries changes the entries in a palette as a result of an application's GpiSetPaletteEntries 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.

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

Syntax

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

Parameters

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

Returns

rc (BOOL) - returns
Return codes.
This function returns BOOLEAN (fSuccess).
  • TRUE Successful, if entries set without error
  • FALSE Error
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_IN_AREA
  • PMERR_INV_IN_PATH
  • PMERR_INV_COLOR_INDEX