home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / ANIMALS.PAK / BEASTWIN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.6 KB  |  120 lines

  1. //----------------------------------------------------------------------------
  2. //  Project Animals
  3. //  Borland International
  4. //  Copyright ⌐ 1996. All Rights Reserved.
  5. //
  6. //  SUBSYSTEM:    Animals Application
  7. //  FILE:         Beastwin.cpp
  8. //  AUTHOR:
  9. //
  10. //  OVERVIEW
  11. //  ~~~~~~~~
  12. //  Source file for implementation of TAnimalsApp (TApplication).
  13. //
  14. //----------------------------------------------------------------------------
  15.  
  16. #include <owl/pch.h>
  17.  
  18. #include <stdio.h>
  19.  
  20. #include "Beastwin.h"
  21. #include "AnmlsDlC.h"                        // Definition of client class.
  22.  
  23.  
  24. //{{TAnimalsApp Implementation}}
  25.  
  26.  
  27. //
  28. // Build a response table for all messages/commands handled
  29. // by the application.
  30. //
  31. DEFINE_RESPONSE_TABLE1(TAnimalsApp, TApplication)
  32. //{{TAnimalsAppRSP_TBL_BEGIN}}
  33.   EV_COMMAND(CM_HELPABOUT, CmHelpAbout),
  34. //{{TAnimalsAppRSP_TBL_END}}
  35. END_RESPONSE_TABLE;
  36.  
  37.  
  38. //--------------------------------------------------------
  39. // TAnimalsApp
  40. //
  41. TAnimalsApp::TAnimalsApp() : TApplication("Animals")
  42. {
  43.  
  44.   // INSERT>> Your constructor code here.
  45. }
  46.  
  47.  
  48. TAnimalsApp::~TAnimalsApp()
  49. {
  50.   // INSERT>> Your destructor code here.
  51. }
  52.  
  53.  
  54. //--------------------------------------------------------
  55. // TAnimalsApp
  56. // ~~~~~
  57. // Application intialization.
  58. //
  59. void TAnimalsApp::InitMainWindow()
  60. {
  61.   if (nCmdShow != SW_HIDE)
  62.     nCmdShow = (nCmdShow != SW_SHOWMINNOACTIVE) ? SW_SHOWNORMAL : nCmdShow;
  63.  
  64.   TSDIDecFrame* frame = new TSDIDecFrame(0, GetName(), 0, false);
  65.   frame->SetFlag(wfShrinkToClient);
  66.  
  67.   // Override the default window style for the main window.
  68.   //
  69.       frame->Attr.Style |= WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_SYSMENU | WS_THICKFRAME | WS_VISIBLE;
  70.     frame->Attr.Style &= ~(WS_CHILD | WS_MAXIMIZEBOX | WS_MINIMIZEBOX);
  71.  
  72.   // Assign ICON w/ this application.
  73.   //
  74.   frame->SetIcon(this, IDI_ANIMALS);
  75.   frame->SetIconSm(this, IDI_ANIMALS);
  76.  
  77.   SetMainWindow(frame);
  78.  
  79. }
  80.  
  81.  
  82.  
  83. //{{TSDIDecFrame Implementation}}
  84.  
  85.  
  86. TSDIDecFrame::TSDIDecFrame(TWindow* parent, const char far* title, TWindow* clientWnd, bool trackMenuSelection, TModule* module)
  87.   : TDecoratedFrame(parent, title, !clientWnd ? new TAnimalsDlgClient(0) : clientWnd, trackMenuSelection, module)
  88. {
  89.   // INSERT>> Your constructor code here.
  90.  
  91. }
  92.  
  93.  
  94. TSDIDecFrame::~TSDIDecFrame()
  95. {
  96.   // INSERT>> Your destructor code here.
  97.  
  98. }
  99.  
  100.  
  101. //--------------------------------------------------------
  102. // TAnimalsApp
  103. // ~~~~~~~~~~~
  104. // Menu Help About Animals command
  105. //
  106. void TAnimalsApp::CmHelpAbout()
  107. {
  108. }
  109.  
  110.  
  111.  
  112. int OwlMain(int , char* [])
  113. {
  114.  
  115.     TBIVbxLibrary BiLibrary;
  116.    
  117.     TAnimalsApp   app;
  118.       return app.Run();
  119. }
  120.