Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 1 - Palette Manager Reference /
Palette Manager Functions / Initializing and Allocating Palettes


GetNewPalette

Creates and initializes a palette from a 'pltt' resource (page 1-30).

pascal PaletteHandle GetNewPalette(short PaletteID);
paletteID
The resource ID of the source palette.
DISCUSSION
The GetNewPalette function creates a palette from information supplied by the palette resource specified in the paletteID parameter; it also initializes the new palette.

Note
The GetNewPalette function detaches the resource when it creates the new palette, so you do not need to call the ReleaseResource function.
If you open a new color window with GetNewCWindow, the Window Manager calls GetNewPalette automatically, with paletteID equal to the window's resource ID. Therefore, if you have created a palette resource with the same ID as a window, the Window Manager and Palette Manager automatically create the palette for you and your application needn't call GetNewPalette to create the palette.

SEE ALSO
To attach a palette to a window after creating it, use the SetPalette function (page 1-11).

To change the entries in a palette after creating it, use the SetEntryColor function (page 1-28) and the SetEntryUsage function (page 1-29).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996