Export (0) Print
Expand All

GetSystemPaletteEntries function

The GetSystemPaletteEntries function retrieves a range of palette entries from the system palette that is associated with the specified device context (DC).

Syntax


UINT GetSystemPaletteEntries(
  _In_   HDC hdc,
  _In_   UINT iStartIndex,
  _In_   UINT nEntries,
  _Out_  LPPALETTEENTRY lppe
);

Parameters

hdc [in]

A handle to the device context.

iStartIndex [in]

The first entry to be retrieved from the system palette.

nEntries [in]

The number of entries to be retrieved from the system palette.

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. If this parameter is NULL, the function returns the total number of entries in the palette.

Return value

If the function succeeds, the return value is the number of entries retrieved from the 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.

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
GetPaletteEntries
PALETTEENTRY

 

 

Community Additions

ADD
Show:
© 2014 Microsoft