The GetSystemPaletteEntries function retrieves a range of palette entries from the system palette that is associated with the specified device context.
UINT GetSystemPaletteEntries(
HDC hdc, |
// handle of device context |
UINT iStartIndex, |
// index of first entry to be retrieved |
UINT nEntries, |
// number of entries to be retrieved |
LPPALETTEENTRY lppe |
// array receiving system-palette entries |
); |
If the function succeeds, the return value is the number of entries retrieved from the palette.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
An application can determine whether a device supports palette operations by calling the GetDeviceCaps function and specifying the RASTERCAPS constant.
GetDeviceCaps, GetPaletteEntries, PALETTEENTRY
See: