Microsoft Windows CE 3.0  

GetPaletteEntries

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

UINT GetPaletteEntries( 
HPALETTE
hpal
,
UINT
iStartIndex
,
UINT
nEntries
,
LPPALETTEENTRY
lppe
);

Parameters

hpal
[in] Handle to the logical color palette.
iStartIndex
[in] Index of the first entry in the logical palette to be retrieved. GetPaletteEntriesfails if iStartIndexis greater than the number of palette entries.
nEntries
[in] Specifies the number of entries in the logical palette to be retrieved.
lppe
[out] Long pointer to an array of PALETTEENTRYstructures to receive the palette entries. The array must contain at least as many structures as specified by the nEntriesparameter.

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

An application can determine whether a device supports palette operations by calling the GetDeviceCapsfunction and specifying the RASTERCAPS constant.

If the nEntriesparameter specifies more entries than exist in the palette, the remaining members of the PALETTEENTRYstructure are not altered.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wingdi.h   Coredll.lib, Winmgr.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

GetLastError, GetNearestPaletteIndex, GetSystemPaletteEntries, PALETTEENTRY