Share via


SetPaletteEntries

This function sets RGB (red, green and blue) color values and flags in a range of entries in a logical palette.

UINT SetPaletteEntries( 
HPALETTE hpal, 
UINT iStart, 
UINT cEntries, 
CONST PALETTEENTRY *lppe
);

Parameters

  • hpal
    [in] Handle to the logical palette.
  • iStart
    [in] Specifies the first logical-palette entry to be set. This function fails if iStart is greater than the number of palette entries.
  • cEntries
    [in] Specifies the number of logical-palette entries to be set.
  • lppe
    [in] Long pointer to the first member of an array of PALETTEENTRY structures containing the RGB values and flags.

Return Values

The number of entries that were set in the logical palette indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

An application can determine whether or not a device supports palette operations by calling the GetDeviceCaps function and specifying the RASTERCAPS constant.

Even if a logical palette has been selected and realized, changes to the palette do not affect the physical palette in the surface. RealizePalette must be called again to set the new logical palette into the surface.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wingdi.h   Mgpal.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetDeviceCaps, GetLastError, GetPaletteEntries, RealizePalette, PALETTEENTRY

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.