home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / carsql.zip / vbmain.cpp < prev   
C/C++ Source or Header  |  1995-12-21  |  2KB  |  57 lines

  1. /*******************************************************************************
  2. * FILE NAME: vbmain.cpp                                                        *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Main program stub for class:                                               *
  6. *     CarView- Car salesperson 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 _CARVIEW_
  24. #include "CarView.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.    CarView *iPart;
  36.    IMessageBox::Response resp = IMessageBox::unknown;
  37.  
  38.    do {
  39.       try {
  40.          iPart = new CarView();
  41.          iPart->initializePart();
  42.          }
  43.       catch (IException& exc) { 
  44.          resp = IMessageBox(IWindow::desktopWindow()).show(exc);
  45.          }
  46.       }
  47.    while (resp == IMessageBox::retry);
  48.  
  49.    if (resp == IMessageBox::cancel) IApplication::current().exit();
  50.  
  51.    iPart->setAutoDeleteObject();
  52.    iPart->show();
  53.    IApplication::current().run();
  54.    return 0;
  55. }   //end main
  56.  
  57.