Associating One Palette With Many Ports
Associating One Palette With Many Ports
The SetPalette and NSetPalette procedures allow you to associate one
palette with many color grafPort and color window records, thus simplifying
the use of a single palette with multiple ports and windows.
One important implication of this feature is that the DisposeWindow
procedure does not dispose of the associated palette automatically, since it may
be allocated to other ports or windows. The only exception to this behavior is
when an application has used GetNewCWindow to create the window, there is
a 'pltt' resource with the same ID as the window, and the application has not
called GetPalette for the window.
The procedures SaveFore, Re storeFore, SaveBack, Re storeBack,
ResizePalette, and Re storeDeviceClut are available only with system
software versions 6.0.5 and later, and with the 32-Bit QuickDraw system
extension.