Important: The information in this document is obsolete and should not be used for new development.
Color Windows
Since the introduction of Color QuickDraw, the Window Manager has supported color windows. Color windows are displayed in color graphics ports, as described in Inside Macintosh: Imaging. The color window record is exactly like the window record described in "Window Records" on page 4-16, except that it contains a color graphics port instead of a monochrome graphics port.Whether or not your application uses color explicitly, and whether or not a color monitor is currently installed, your application should work with color windows whenever Color QuickDraw is available. Once you have created a window, you can use the window record and window pointer for a color window interchangeably with the window record and window pointer for a monochrome window.
On a monitor that is set to display 4-bit color or greater, the Window Manager automatically displays the window title and parts of the frame and controls in color (or gray scale, depending on the capabilities of the monitor). The user can adjust these colors through the Color control panel. Except in unusual circumstances, your application should not try to change the colors of the window frame. On a monitor that's set to display 1-bit color, the Window Manager draws the window title, frame, and controls in black and white.
Various elements of a window's colors are controlled by the window color table, which contains a series of part codes for different window elements and the RGB values associated with each part.
Because the user can select window display colors for the entire desktop, and because the Window Manager performs some complex display calculations automatically if you don't override it, your application typically uses the default system window color table. If your application explicitly controls the colors used in a window, however, you can define your own window color tables.
You define a window color table for a window by providing a window color table resource (that is, a resource of type 'wctb') with the same resource ID as the window's 'WIND' resource. The Window Manager creates a window color table when it creates the window record. The Window Manager maintains its own linked list, using auxiliary window records, which associates your application's windows with their corresponding window color tables. The window color table and the auxiliary window record are described in "The Window Color Table Record" beginning on page 4-71 and "The Auxiliary Window Record" beginning on page 4-73.
Except in unusual circumstances, your application doesn't need to manipulate window color tables or the auxiliary window record.
For compatibility with other applications in the shared environment, your application should not manipulate system color tables directly but should use the Palette Manager, as described in Inside Macintosh: Imaging. If your application provides its own window and control definition functions, they should apply the user's desktop color choices just as the default definition functions do.