UINT SetPaletteEntries(hpal, iStart, cEntries, lppe) | |||||
HPALETTE hpal; | /* handle of palette, */ | ||||
UINT iStart; | /* index of first entry to set | */ | |||
UINT cEntries; | /* number of entries to set | */ | |||
const PALETTEENTRY FAR* lppe; | /* address of array of structures | */ |
The SetPaletteEntries function sets RGB color values and flags in a range of entries in the given logical palette.
hpal
Identifies the logical palette.
iStart
Specifies the first logical-palette entry to be set.
cEntries
Specifies the number of logical-palette entries to be set.
lppe
Points to the first member of an array of PALETTEENTRY structures containing the RGB values and flags. The PALETTEENTRY structure has the following form:
typedef struct tagPALETTEENTRY { /* pe */
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
The return value is the number of entries set in the logical palette, if the function is successful. Otherwise, it is zero.
If the logical palette is selected into a device context when the application calls the SetPaletteEntries function, the changes will not take effect until the application calls the RealizePalette function.