| 
    Slide 7.10: Hello_a.c Slide 7.12: Line-by-line anatomy of Hello_a.c (cont.) Home  | 
  
    
   | 
 
Hello_a.c
 
  FormType  *pfrm;
 
   typedef  struct {
      WindowType            window;
      UInt16                formId;
      FormAttrType          attr;
      WinHandle             bitsBehindForm;
      FormEventHandlerType  *handler;
      UInt16                focus;
      UInt16                defaultButton;
      UInt16                helpRscId;
      UInt16                menuRscId;
      UInt16                numObjects;
      FormObjListType       *objects;
   }  FormType;
Your code should treat the FormType structure as opaque.
Do not attempt to change structure member values directly.
window: Structure of the window object that corresponds to the form
 formId: ID number of the form, specified by the application developer
 attr: Form object attributes. See FormAttrType.
 bitsBehindForm: Used to save all the bits behind the form so the screen can be properly refreshed when the form is closed
 handler: Routine called when the form needs to handle an event
 focus: Index of a field/table object within the form containing the focus 
 defaultButton: Resource ID of the object defined as the default button 
 helpRscId: Resource ID number of the help resource
 menuRscId: ID number of a menu bar to use if the form has a menu, or zero if the form doesn't have a menu
 numObjects: Number of objects contained within the form
 objects: Pointer to the array of objects contained within the form
 
  FrmGotoForm( Form1 );
 
formId: ID of the form to display