home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 21.ddi / INSTANCE.PAK / INSTANCE.CPP next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.1 KB  |  37 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //----------------------------------------------------------------------------
  4. #include <owl\owlpch.h>
  5. #include <owl\applicat.h>
  6. #include <owl\framewin.h>
  7. #include <string.h>
  8.  
  9. class TTestApp : public TApplication {
  10.   public:
  11.     TTestApp(): TApplication("Instance Tester") 
  12.                 {WindowTitle = "Additional Instance";}
  13.  
  14.   protected:
  15.     string WindowTitle;
  16.  
  17.     //
  18.     // With per-instance data (supported under NT), every instance looks
  19.     // like the first since each has its own independent data segment & cannot
  20.     // share segments, i.e. GetInstanceData() is not supported.
  21.     //
  22.     void InitApplication()
  23. #if defined(__WIN32__)
  24.         {WindowTitle = "An Instance";}
  25. #else
  26.         {WindowTitle = "First Instance";}
  27. #endif
  28.  
  29.     void InitMainWindow() {MainWindow = new TFrameWindow(0, WindowTitle.c_str());}
  30. };
  31.  
  32. int
  33. OwlMain(int /*argc*/, char* /*argv*/ [])
  34. {
  35.   return TTestApp().Run();
  36. }
  37.