home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 6.ddi / OWLDEMOS.ZIP / INSTTEST.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.0 KB  |  43 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. #include <owl.h>
  4. #include <string.h>
  5.  
  6. class TTestApp : public TApplication
  7. {
  8. public:
  9.   TTestApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance,
  10.     LPSTR lpCmdLine, int nCmdShow);
  11.  
  12. protected:
  13.   char WindowTitle[20];
  14.   virtual void InitMainWindow();
  15.   virtual void InitApplication();
  16. };
  17.  
  18. TTestApp::TTestApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance,
  19.   LPSTR lpCmdLine, int nCmdShow)
  20.   : TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow)
  21. {
  22.   strcpy(WindowTitle, "Additional Instance");
  23. }
  24.  
  25. void TTestApp::InitApplication()
  26. {
  27.   strcpy(WindowTitle, "First Instance");
  28. }
  29.  
  30. void TTestApp::InitMainWindow()
  31. {
  32.   MainWindow = new TWindow(NULL, WindowTitle);
  33. }
  34.  
  35. int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  36.   LPSTR lpCmdLine, int nCmdShow)
  37. {
  38.   TTestApp TestApp("Instance Tester", hInstance, hPrevInstance,
  39.     lpCmdLine, nCmdShow);
  40.   TestApp.Run();
  41.   return TestApp.Status;
  42. }
  43.