Partager via


Gdi::SetPaletteEntries_I

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

static WINGDIAPI unsigned int WINAPI SetPaletteEntries_I(
  HPALETTE hpal,
  unsigned int iStart,
  unsigned int cEntries,
  CONST PALETTEENTRY* lppe
);

Parameters

  • hpal
    [in] Handle to the logical palette.
  • iStart
    [in] Unsigned integer that specifies the first logical-palette entry to be set. This method fails if iStart is greater than the number of palette entries.
  • cEntries
    [in] Unsigned integer that 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

This method is an internal version of the SetPaletteEntries function.

An application can determine whether or not a device supports palette operations by calling the Gdi::GetDeviceCaps_I method 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. Gdi::RealizePalette_I must be called again to set the new logical palette into the surface.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

SetPaletteEntries | Gdi::GetDeviceCaps_I | Gdi::GetPaletteEntries_I | Gdi::RealizePalette_I | PALETTEENTRY

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.