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 5 - Control Manager / Control Manager Reference
Data Structures


The Auxiliary Control Record

For drawing all controls on systems running in 32-bit mode (which users can select using the Memory control panel), and for drawing controls that use colors other than the system default, the Control Manager creates and maintains a linked list of auxiliary control records, beginning in the global variable AuxCtlHead. (There is only one global list for all controls in all windows, not a separate one for each window. Each window record, by contrast, has a handle to the list of its own controls.)

An auxiliary control record is a data structure of type AuxCtlRec. Your application doesn't create and generally shouldn't manipulate an auxiliary control record for a control; rather, you let the Control Manager create and manipulate the auxiliary control record. To create controls using colors other than the system default colors, use the SetControlColor procedure (described on page 5-94) or create a control color table resource (described on page 5-114) and let the Control Manager create the necessary auxiliary control records. There is, however, a field in the auxiliary control record that you can use to store information as you see fit; to get a handle to the auxiliary control record for a control, you can use the GetAuxiliaryControlRecord function (described on page 5-100).

Each auxiliary control record is relocatable and resides in your application heap. Here is how an auxiliary control record is defined:

TYPE AuxCtlRec = 
RECORD
   acNext:        AuxCtlHandle;  {handle to next AuxCtlRec}
   acOwner:       ControlHandle; {handle to this record's control}
   acCTable:      CCTabHandle;   {handle to control color table }
                                 { record}
   acFlags:       Integer;       {reserved}
   acReserved:    LongInt;       {reserved for future use}
   acRefCon:      LongInt;       {for use by application}
END;
Field Description
acNext
A handle to the next record in the auxiliary control list.
acOwner
The handle of the control to which this auxiliary record belongs; used as an ID field.
acCTable
The handle to a control color table record. (The control color table record is described on page 5-71.)
acFlags
Reserved for use by the Control Manager.
acReserved
Reserved for future expansion.
acRefCon
A reference value, which your application may use for any purpose.
On systems using 32-bit mode, every control has its own auxiliary record, and
the acCTable field contains a handle to the default control color table unless
your application uses the SetControlColor procedure or creates a control color
table resource.

When drawing a control, the standard control definition functions search the linked list of auxiliary control records for the auxiliary control record whose acOwner field points to the control being drawn. If the standard control definition functions find an auxiliary control record for the control, they use the control color table specified in the acCTable field. If the standard control definition functions do not find an auxiliary control record for the control, they use the default system colors.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996