Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SetPaletteEntries function

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

Syntax


UINT SetPaletteEntries(
  _In_  HPALETTE hpal,
  _In_  UINT iStart,
  _In_  UINT cEntries,
  _In_  const PALETTEENTRY *lppe
);

Parameters

hpal [in]

A handle to the logical palette.

iStart [in]

The first logical-palette entry to be set.

cEntries [in]

The number of logical-palette entries to be set.

lppe [in]

A pointer to the first member of an array of PALETTEENTRY structures containing the RGB values and flags.

Return value

If the function succeeds, the return value is the number of entries that were set in the logical 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.

Even if a logical palette has been selected and realized, changes to the palette do not affect the physical palette in the surface. RealizePalette must be called again to set the new logical palette into the surface.

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

 

 

Build date: 6/12/2013

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.