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: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / Window Manager Reference
Window Manager Routines / Manipulating Window Color Information


SetWinColor

Use the SetWinColor procedure to set a window's window color table.

PROCEDURE SetWinColor (theWindow: WindowPtr;
                        newColorTable: WCTabHandle);
theWindow
A pointer to the window's window record.
newColorTable
A handle to a window color table record, which defines the colors for the window's new color table.
DESCRIPTION
The SetWinColor procedure sets a window's color table. If the window has no auxiliary window record, it creates a new one with the specified window color table and adds it to the auxiliary window list. If the window already has an auxiliary record, its window color table is replaced. The Window Manager then redraws the window frame and highlighted text in the new colors and sets the window's background color to the new content color.

If the new color table has the same entries as the default color table, SetWinColor changes the auxiliary window record so that it points to the default color table.

Window color table resources (resources of type 'wctb') should not be purgeable.

If you specify a value of NIL for the parameter theWindow, SetWinColor changes the default color table in memory. Your application shouldn't, however, change the default color table.

SEE ALSO
For a description of a window color table, see "The Window Color Table Record" on page 4-63. For a description of the auxiliary window record, see "The Auxiliary Window Record" on page 4-66. For a description of the 'wctb' resource, see "The Window Color Table Resource" on page 4-119.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996