Click to Rate and Give Feedback
MSDN
MSDN Library
Windows GDI
Colors
Color Reference
Color Structures
 PALETTEENTRY
Windows GDI
PALETTEENTRY

The PALETTEENTRY structure specifies the color and usage of an entry in a logical palette. A logical palette is defined by a LOGPALETTE structure.

typedef struct tagPALETTEENTRY { 
  BYTE peRed; 
  BYTE peGreen; 
  BYTE peBlue; 
  BYTE peFlags; 
} PALETTEENTRY; 

Members

peRed
Specifies a red intensity value for the palette entry.
peGreen
Specifies a green intensity value for the palette entry.
peBlue
Specifies a blue intensity value for the palette entry.
peFlags
Specifies how the palette entry is to be used. The peFlags member may be set to NULL or one of the following values:
ValueMeaning
PC_EXPLICITSpecifies that the low-order word of the logical palette entry designates a hardware palette index. This flag allows the application to show the contents of the display device palette.
PC_NOCOLLAPSESpecifies that the color be placed in an unused entry in the system palette instead of being matched to an existing color in the system palette. If there are no unused entries in the system palette, the color is matched normally. Once this color is in the system palette, colors in other logical palettes can be matched to this color.
PC_RESERVEDSpecifies that the logical palette entry be used for palette animation. This flag prevents other windows from matching colors to the palette entry since the color frequently changes. If an unused system-palette entry is available, the color is placed in that entry. Otherwise, the color is not available for animation.

Requirements

  Windows NT/2000/XP/Vista: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Wingdi.h; include Windows.h.

See Also

Colors Overview, Color Structures, LOGPALETTE


Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker