This topic has not yet been rated - Rate this topic

SetPaletteEntries function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Colors Overview
Color Functions
GetDeviceCaps
GetPaletteEntries
RealizePalette
PALETTEENTRY

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ