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.

ResizePalette function

The ResizePalette function increases or decreases the size of a logical palette based on the specified value.

Syntax


BOOL ResizePalette(
  _In_  HPALETTE hpal,
  _In_  UINT nEntries
);

Parameters

hpal [in]

A handle to the palette to be changed.

nEntries [in]

The number of entries in the palette after it has been resized.

The number of entries is limited to 1024.

Return value

If the function succeeds, the return value is nonzero.

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 an application calls ResizePalette to reduce the size of the palette, the entries remaining in the resized palette are unchanged. If the application calls ResizePalette to enlarge the palette, the additional palette entries are set to black (the red, green, and blue values are all 0) and their flags are set to zero.

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

 

 

Community Additions

Show:
© 2014 Microsoft