home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / MacApp / MacApp 2.0 CD Release / MacApp 2.0 (Many Libraries) / Examples / CPlusExamples / DemoDialogs / MDemoDialogs.cp < prev    next >
Encoding:
Text File  |  1990-03-27  |  1.5 KB  |  52 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoDialogs.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1988 - 1990 by Apple Computer, Inc. All rights reserved.
  9. ********************************************************************************/
  10.  
  11. #define  __MDEMODIALOGS__
  12. #include <UMacApp.h>
  13. #include <UPrinting.h>
  14. #include <UGridView.h>
  15. #include <UTEView.h>
  16. #include <UDialog.h>
  17.  
  18. #ifndef __UDEMODIALOGS__
  19. #include "UDemoDialogs.h"
  20. #endif
  21.  
  22. void main()
  23. {
  24.     TTestApplication *gTestApplication;                    // The application object
  25.  
  26.     InitToolBox();                                        // Essential toolbox and utilities
  27.                                                         //    initialization
  28.     if (ValidateConfiguration(&gConfiguration)) {        // Make sure we can run
  29.  
  30.         // Continue with remainder of initialization
  31.         InitUMacApp(12);                                // Initialize MacApp; 12 calls to MoreMasters
  32.  
  33.         // ------------------------------------------------------
  34.         // If you are going to use streams for debugging IO then:
  35.         // #include <stdio.h>
  36.         // #include <iostream.h>
  37.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  38.  
  39.         // cout.sync_with_stdio();
  40.  
  41.         InitUTEView();
  42.         InitUDialog();
  43.         InitUGridView();
  44.  
  45.         gTestApplication = new TTestApplication;        // Allocate a new application object
  46.         FailNIL(gTestApplication);
  47.         gTestApplication->ITestApplication(kFileType);    // Initialize that new object
  48.         gTestApplication->Run();                        // Run the application.
  49.     } else
  50.         StdAlert(phUnsupportedConfiguration);
  51. }
  52.