home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / LANCELOT / LANCELOT.CPP < prev    next >
C/C++ Source or Header  |  1995-04-14  |  3KB  |  67 lines

  1. /******************************************************************************
  2. * LANCELOT SAMPLE APPLICATION - lancelot.cpp                                  *
  3. *                                                                             *
  4. * Classes                                                                     *
  5. *   -None-                                                                    *
  6. *                                                                             *
  7. * DISCLAIMER OF WARRANTIES:                                                   *
  8. *   The following [enclosed] code is sample code created by IBM               *
  9. *   Corporation.  This sample code is not part of any standard IBM product    *
  10. *   and is provided to you solely for the purpose of assisting you in the     *
  11. *   development of your applications.  The code is provided "AS IS",          *
  12. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  13. *   arising out of your use of the sample code, even if they have been        *
  14. *   advised of the possibility of such damages.                               *
  15. *                                                                             *
  16. * COPYRIGHT:                                                                  *
  17. *   Licensed Materials - Property of IBM                                      *
  18. *   (C) Copyright IBM Corporation 1992, 1995                                  *
  19. *   All Rights Reserved                                                       *
  20. *   US Government Users Restricted Rights - Use, duplication, or disclosure   *
  21. *   restricted by GSA ADP Schedule Contract with IBM Corp.                    *
  22. *                                                                             *
  23. *******************************************************************************/
  24.  
  25. #ifndef _IBASE_                         //Make sure ibase.hpp is included
  26.   #include <ibase.hpp>                  //  since that is where IC_<environ>
  27. #endif                                  //  is defined.
  28. #include <iapp.hpp>
  29. #include <ithread.hpp>
  30. #include <imsgbox.hpp>
  31. #include "lmainwin.hpp"
  32.  
  33. int main()
  34. {
  35. /*-----------------------------------------------------------------------------
  36. | Set the default IToolBarButton styles for the entire application.           |
  37. | Test if .INI files can be accessed from the current directory.              |
  38. |   If they can't, tell the user and end the application.                     |
  39. | Create the main window for the application                                  |
  40. | Start the event processing loop                                             |
  41. -----------------------------------------------------------------------------*/
  42. #ifdef IC_PM
  43.    IToolBarButton::setDefaultStyle(
  44.      IToolBarButton::classDefaultStyle
  45.      &~IToolBarButton::standardFormat );
  46. #endif
  47.  
  48.    try
  49.    {
  50.       IProfile testing( "lsaveqry.ini" );
  51.    }
  52.    catch(...)
  53.    {
  54.       IMessageBox
  55.          msgBox( IWindow::desktopWindow() );
  56.       msgBox.show( STR_NO_DB_ACCESS, IMessageBox::catastrophic );
  57.       return 2;
  58.    }
  59.  
  60.    LMainWindow mainWindow;
  61.  
  62.    IApplication::current().run();
  63.  
  64.    return 0;
  65. }
  66.  
  67.