共用方式為


CPalette Members

Base Class Members

CObject Members

CGdiObject Members

Construction

CPalette

Constructs a CPalette object with no attached Windows palette. You must initialize the CPalette object with one of the initialization member functions before it can be used.

Initialization

CreateHalftonePalette

Creates a halftone palette for the device context and attaches it to the CPalette object.

CreatePalette

Creates a Windows color palette and attaches it to the CPalette object.

Operations

AnimatePalette

Replaces entries in the logical palette identified by the CPalette object. The application does not have to update its client area, because Windows maps the new entries into the system palette immediately.

FromHandle

Returns a pointer to a CPalette object when given a handle to a Windows palette object.

GetNearestPaletteIndex

Returns the index of the entry in the logical palette that most closely matches a color value.

ResizePalette

Changes the size of the logical palette specified by the CPalette object to the specified number of entries.

Attributes

GetEntryCount

Retrieves the number of palette entries in a logical palette.

GetPaletteEntries

Retrieves a range of palette entries in a logical palette.

operator HPALETTE

Returns the HPALETTE attached to the CPalette.

SetPaletteEntries

Sets RGB color values and flags in a range of entries in a logical palette.

See Also

Reference

CPalette Class

Hierarchy Chart