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 3 - Menu Manager / Menu Manager Reference
Menu Manager Routines / Managing Entries in the Menu Color Information Table


SetMCInfo

Use the SetMCInfo procedure to set your application's menu color information table.

PROCEDURE SetMCInfo (menuCTbl: MCTableHandle);
menuCTbl
A handle to a menu color information table.
DESCRIPTION
The SetMCInfo procedure copies the table specified by the menuCTbl parameter
to your application's menu color information table. If successful, the SetMCInfo procedure is responsible for disposing of your application's current menu color information table, so your application does not need to explicitly dispose of the
current table.

Your application should call the Memory Manager function MemError to determine whether the SetMCInfo procedure successfully copied the table. If the SetMCInfo procedure cannot successfully copy the table, it does not dispose of the current menu color information table and the MemError function returns a nonzero result code. If the SetMCInfo procedure is able to successfully copy the table, it disposes of the current menu color information table and the MemError function returns the noErr result code.

If the menu color information table specifies a new menu bar color or new menu title colors, your application should call DrawMenuBar after calling SetMCInfo.

Note that GetNewMBar does not save your application's current menu color information table. If your application changes menu bars, you can save and restore your application's current menu color information table by calling GetMCInfo before GetNewMBar and calling SetMCInfo afterward.

SEE ALSO
See "The Menu Color Information Table Record" beginning on page 3-100 for a description of the format of the menu color information table. For an example of using the GetMCInfo and SetMCInfo routines to save and restore menu color information, see Listing 3-6 on page 3-52. See Inside Macintosh: Memory for information on the MemError function


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996