ResizePalette function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012