Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetPaletteEntries function

The GetPaletteEntries function retrieves a specified range of palette entries from the given logical palette.

Syntax


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

Parameters

hpal [in]

A handle to the logical palette.

iStartIndex [in]

The first entry in the logical palette to be retrieved.

nEntries [in]

The number of entries in the logical palette to be retrieved.

lppe [out]

A 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 value

If the function succeeds and the handle to the logical palette is a valid pointer (not NULL), the return value is the number of entries retrieved from the logical palette. If the function succeeds and handle to the logical palette is NULL, the return value is the number of entries in the given palette.

If the function fails, the return value is zero.

Remarks

An application can determine whether a device supports palette operations by calling the GetDeviceCaps function 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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Colors Overview
Color Functions
GetDeviceCaps
GetSystemPaletteEntries
SetPaletteEntries
PALETTEENTRY

 

 

Community Additions

Show:
© 2014 Microsoft