home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / treecnr.zip / TreeCnr.app < prev    next >
Text File  |  1996-02-20  |  2KB  |  59 lines

  1. /*******************************************************************************
  2. * FILE NAME: TreeCnr.app                                                       *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Main program stub for class:                                               *
  6. *     TreeCnr- Sample tree view container application                          *
  7. * ---------------------------------------------------------------------------- *
  8. * Warning: This file was generated by the VisualAge C++ Visual Builder.        *
  9. * Modifications to this source file will be lost when the part is regenerated. *
  10. *******************************************************************************/
  11. #ifndef _IWINDOW_
  12. #include <iwindow.hpp>
  13. #endif
  14.  
  15. #ifndef _IAPP_
  16. #include <iapp.hpp>
  17. #endif
  18.  
  19. #ifndef _IMSGBOX_
  20. #include <imsgbox.hpp>
  21. #endif
  22.  
  23. #ifndef _TREECNR_
  24. #include "TreeCnr.hpp"
  25. #endif
  26.  
  27.  
  28. //------------------------------------------------------------------------------
  29. // main
  30. //------------------------------------------------------------------------------
  31. int main(int argc, char ** argv)
  32. {
  33.    IApplication::current().setArgs(argc, argv);
  34.  
  35.    TreeCnr *iPart;
  36.    IMessageBox::Response resp = IMessageBox::unknown;
  37.  
  38.    do {
  39.       try {
  40.          iPart = new TreeCnr();
  41.          iPart->initializePart();
  42.          }
  43.       catch (IException& exc) { 
  44.          resp = IMessageBox(IWindow::desktopWindow()).show(
  45.                   exc.text(),
  46.                   IMessageBox::retryCancelButton);
  47.          }
  48.       }
  49.    while (resp == IMessageBox::retry);
  50.  
  51.    if (resp == IMessageBox::cancel) IApplication::current().exit();
  52.  
  53.    iPart->setAutoDeleteObject();
  54.    iPart->show();
  55.    IApplication::current().run();
  56.    return 0;
  57. }   //end main
  58.  
  59.