PALETTE: Displays the Current Palette

PALETTE demonstrates simple palette operations by displaying the current palette in a grid. PALETTE queries the device for palette support and size. It creates, selects, and realizes a logical palette using the Microsoft(R) Windows(TM) CreatePalette, SelectPalette, and RealizePalette functions. The source code calculates the red-green-blue (RGB) value of a given pixel at the mouse position using palette indexes.

To display the RGB value for a palette entry, point to the entry and press the left mouse button. To display the RGB for any pixel on the screen, click inside the Palette window, and then drag the pointer outside the window.

PALETTE was built and tested under Microsoft Windows version 3.1.

KEYWORDS: palette; RGB; index; SelectPalette; CreatePalette; RealizePalette; PALETTEINDEX; GetRValue; GetGValue; GetBValue;

{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the palette project." /C"samples}