Dela via


CPalette Class

Encapsulates a Windows color palette.

class CPalette : public CGdiObject

Remarks

A palette provides an interface between an application and a color output device (such as a display device). The interface allows the application to take full advantage of the color capabilities of the output device without severely interfering with the colors displayed by other applications. Windows uses the application's logical palette (a list of needed colors) and the system palette (which defines available colors) to determine the colors used.

A CPalette object provides member functions for manipulating the palette referred to by the object. Construct a CPalette object and use its member functions to create the actual palette, a graphics device interface (GDI) object, and to manipulate its entries and other properties.

For more information on using CPalette, see Graphic Objects.

Requirements

Header: afxwin.h

See Also

Tasks

DIBLOOK Sample: Illustrates the Use of DIBs and Color Palettes

Reference

CGdiObject Class

Hierarchy Chart

CPalette::GetPaletteEntries

CPalette::SetPaletteEntries

Other Resources

CPalette Members