The wglGetLayerPaletteEntries function retrieves the palette entries from a given color-index layer plane for a specified device context.
int wglGetLayerPaletteEntries(
HDC hdc, // device context of a window whose layer
// planes are to be described
int iLayerPlane, // specifies an overlay or underlay plane
int iStart, // specifies the first palette entry to be set
int cEntries, // specifies the number of palette entries to
// be set
CONST COLORREF *pcr
// points to the first member of an array of
// COLORREF structures
);
If the function succeeds, the return value is the number of entries that were set in the palette in the specified layer plane of the window.
If the function fails or when no pixel format is selected, the return value is zero. To get extended error information, call GetLastError.
Each color-index layer plane in a window has a palette with a size 2^n, where n is the number of bit planes in the layer plane. You cannot modify the transparent index of a palette.
Use the wglRealizeLayerPalette function to realize the layer palette. Initially the layer palette contains only entries for white.
The wglSetPaletteEntries function doesn't set the palette entries of the main plane palette. To update the main plane palette, use GDI palette functions.
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Link with opengl32.lib.
OpenGL on Windows NT and Windows 95 Overview, WGL Functions, COLORREF, LAYERPLANEDESCRIPTOR, PIXELFORMATDESCRIPTOR, wglDescribeLayerPlane, wglRealizeLayerPalette, wglSetLayerPaletteEntries