Share via


Gdi::GetPaletteEntries_I

This method retrieves a specified range of palette entries from the specified logical palette.

static WINGDIAPI unsigned int WINAPI GetPaletteEntries_I(
  HPALETTE hpal,
  unsigned int iStartIndex,
  unsigned int nEntries,
  PALETTEENTRY* lppe
);

Parameters

  • hpal
    [in] Handle to the logical color palette.
  • iStartIndex
    [in] Unsigned integer that specifies the index of the first entry in the logical palette to be retrieved. Gdi::GetPaletteEntries_I fails if iStartIndex is greater than the number of palette entries.
  • nEntries
    [in] Unsigned integer that specifies the number of entries in the logical palette to be retrieved.
  • lppe
    [out] Long pointer to an array of PALETTEENTRY structures to receive the palette entries. The array must contain at least as many structures as specified by the nEntries parameter.

Return Values

If the handle of the logical color palette is a valid pointer — not NULL — the number of entries retrieved from the logical palette indicates success. If the handle of the logical color palette is NULL, the number of entries in the specified palette indicates success. Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the GetPaletteEntries function.

An application can determine whether a device supports palette operations by calling the Gdi::GetDeviceCaps_I method and specifying the RASTERCAPS constant.

If the nEntries parameter specifies more entries than exist in the palette, the remaining members of the PALETTEENTRY structure are not altered.

Requirements

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

See Also

GetPaletteEntries | Gdi::GetDeviceCaps_I | Gdi::GetNearestPaletteIndex_I | Gdi::GetSystemPaletteEntries_I | PALETTEENTRY

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.