SetPaletteEntries

Version 3.0

Syntax

WORD SetPaletteEntries(hPalette,wStartIndex,wNumEntries,lpPaletteEntries)

This function sets RGB color values and flags in a range of entries in a logical palette.

Parameter Type/Description  

hPalette HPALETTE Identifies the logical palette.  
wStartIndex WORD Specifies the first entry in the logical palette to be set.  
wNumEntries WORD Specifies the number of entries in the logical palette to be set.  
lpPaletteEntries LPPALETTEENTRY Points to the first member of an array of PALETTEENTRY data structures containing the RGB values and flags.  

Return Value

The return value is the number of entries set in the logical palette. It is zero if the function failed.

Comments

If the logical palette is selected into a device context when the application calls SetPalette-Entries, the changes will not take effect until the application calls RealizePalette.