Important: The information in this document is obsolete and should not be used for new development.
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
TheGetNewPalettefunction creates a palette from information supplied by the palette resource specified in thepaletteIDparameter; it also initializes the new palette.
If you open a new color window with
- Note
- The
GetNewPalettefunction detaches the resource when it creates the new palette, so you do not need to call theReleaseResourcefunction.![]()
GetNewCWindow, the Window Manager callsGetNewPaletteautomatically, withpaletteIDequal 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 callGetNewPaletteto create the palette.SEE ALSO
To attach a palette to a window after creating it, use theSetPalettefunction (page 1-11).To change the entries in a palette after creating it, use the
SetEntryColorfunction (page 1-28) and theSetEntryUsagefunction (page 1-29).