GetPaletteEntries function
Applies to: desktop apps only
The GetPaletteEntries function retrieves a specified range of palette entries from the given logical palette.
Syntax
UINT GetPaletteEntries( __in HPALETTE hpal, __in UINT iStartIndex, __in UINT nEntries, __out LPPALETTEENTRY lppe );
Parameters
- hpal [in]
-
A handle to the logical palette.
- iStartIndex [in]
-
The first entry in the logical palette to be retrieved.
- nEntries [in]
-
The number of entries in the logical palette to be retrieved.
- 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.
Return value
If the function succeeds and the handle to the logical palette is a valid pointer (not NULL), the return value is the number of entries retrieved from the logical palette. If the function succeeds and handle to the logical palette is NULL, the return value is the number of entries in the given 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.
If the nEntries parameter specifies more entries than exist in the palette, the remaining members of the PALETTEENTRY structure are not altered.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Colors Overview
- Color Functions
- GetDeviceCaps
- GetSystemPaletteEntries
- SetPaletteEntries
- PALETTEENTRY
Send comments about this topic to Microsoft
Build date: 3/7/2012