Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

wglGetLayerPaletteEntries function

Applies to: desktop apps only

Retrieves the palette entries from a given color-index layer plane for a specified device context.

Syntax

int WINAPI wglGetLayerPaletteEntries(
  HDC hdc,
  int iLayerPlane,
  int iStart,
  int cEntries,
  COLORREF *pcr
);

Parameters

hdc

Type: HDC

The device context of a window whose layer planes are to be described.

iLayerPlane

Type: int

The overlay or underlay plane. Positive values of iLayerPlane identify overlay planes, where 1 is the first overlay plane over the main plane, 2 is the second overlay plane over the first overlay plane, and so on. Negative values identify underlay planes, where 1 is the first underlay plane under the main plane, 2 is the second underlay plane under the first underlay plane, and so on. The number of overlay and underlay planes is given in the bReserved member of the PIXELFORMATDESCRIPTOR structure.

iStart

Type: int

The first palette entry to be retrieved.

cEntries

Type: int

The number of palette entries to be retrieved.

pcr

Type: COLORREF*

An array of structures that contain palette RGB color values. The array must contain at least as many structures as specified by cEntries.

Return value

Type: int

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

OpenGL on Windows
WGL Functions
COLORREF
LAYERPLANEDESCRIPTOR
PIXELFORMATDESCRIPTOR
wglDescribeLayerPlane
wglRealizeLayerPalette
wglSetLayerPaletteEntries

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.