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

  1. //----------------------------------------------------------------------------
  2. //  Project EVHANDLE
  3. //  
  4. //  Copyright ⌐ 1996. All Rights Reserved.
  5. //
  6. //  SUBSYSTEM:    EVHANDLE Application
  7. //  FILE:         EVHANDLE.CPP
  8. //  AUTHOR:       
  9. //
  10. //  OVERVIEW
  11. //  ~~~~~~~~
  12. //  Source file for implementation of TSinkDlgApp (TApplication).
  13. //
  14. //----------------------------------------------------------------------------
  15.  
  16. #include <owl/pch.h>
  17.  
  18.  
  19. #include <owl/vbxctl.h>
  20. #include <stdio.h>
  21.  
  22. #include "evhandle.h"
  23. #include "dialog.h"                 // Definition of client class.
  24.  
  25.  
  26. //
  27. // Build a response table for all messages/commands handled
  28. // by the application.
  29. //
  30. DEFINE_RESPONSE_TABLE1(TSinkDlgApp, TApplication)
  31. END_RESPONSE_TABLE;
  32.  
  33.  
  34. //--------------------------------------------------------
  35. // TSinkDlgApp
  36. //
  37. TSinkDlgApp::TSinkDlgApp() : TApplication("Source-Sink Application")
  38. {
  39.  
  40. }
  41.  
  42.  
  43. TSinkDlgApp::~TSinkDlgApp()
  44. {
  45.  
  46. }
  47.  
  48.  
  49. //--------------------------------------------------------
  50. // TSinkDlgApp
  51. // ~~~~~
  52. // Application intialization.
  53. //
  54. void TSinkDlgApp::InitMainWindow()
  55. {
  56.   if (nCmdShow != SW_HIDE)
  57.     nCmdShow = (nCmdShow != SW_SHOWMINNOACTIVE) ? SW_SHOWNORMAL : nCmdShow;
  58.  
  59.   TSDIDecFrame* frame = new TSDIDecFrame(0, GetName(), 0, false);
  60.   frame->SetFlag(wfShrinkToClient);
  61.  
  62.   // Assign ICON w/ this application.
  63.   //
  64.   frame->SetIcon(this, IDI_SDIAPPLICATION);
  65.   frame->SetIconSm(this, IDI_SDIAPPLICATION);
  66.  
  67.   SetMainWindow(frame);
  68.  
  69. }
  70.  
  71.  
  72.  
  73. TSDIDecFrame::TSDIDecFrame(TWindow* parent, const char far* title, TWindow* clientWnd, bool trackMenuSelection, TModule* module)
  74. :
  75.   TDecoratedFrame(parent, title, !clientWnd ? new TDlgClient(0) : clientWnd, trackMenuSelection, module)
  76. {
  77.    // Place the main window under the helper window
  78.     Attr.X= 5;
  79.    Attr.Y= 110;
  80. }
  81.  
  82.  
  83. TSDIDecFrame::~TSDIDecFrame()
  84. {
  85.  
  86. }
  87.  
  88. int OwlMain(int , char* [])
  89. {
  90.   TBIVbxLibrary   vbxSupport;    // This application has VBX controls.
  91.   TSinkDlgApp   app;
  92.   return app.Run();
  93. }
  94.