home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / TUTORIAL / EXAMPLE2.CC < prev    next >
C/C++ Source or Header  |  1995-08-30  |  1KB  |  46 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: example2.cc 1.1 1995/08/30 01:40:11 teb Exp $ */
  8.  
  9. /*******************************************
  10.  *   Example2.cc 
  11.  * 
  12.  *   This example demonstrates how to customize
  13.  *   an application object, specifically how to modify
  14.  *   the type of main window for the application
  15.  *******************************************/
  16.  
  17. //DHO application object header file
  18. #include<applicat.h>
  19. #include<framewin.h>
  20.  
  21. #define kAppId 100
  22.  
  23.  
  24. class TExampleApp : public TApplication
  25. {
  26.    public:
  27.       TExampleApp(ULONG res):TApplication(res){;};
  28.       virtual void CreateMainWindow()
  29.       {
  30.          MainWin=new TFrameWindow(fResource, "DHO Tutorial App");
  31.       }
  32. };
  33.  
  34.  
  35.  
  36. //=========================================
  37. //  program entry point
  38. INT main(void)
  39. {
  40.    TExampleApp app(kAppId);
  41.  
  42.    app.init();     // initialize object
  43.    app.run();      // begin event loop          
  44.  
  45.    return 0;
  46. }