home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / MSGTRACE.ZIP / MyProjects / MsgTrace / MsgTracer / MsgTracerView.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-31  |  2.8 KB  |  111 lines

  1. // MsgTracerView.cpp : implementation of the CMsgTracerView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MsgTracer.h"
  6.  
  7. #include "MsgTracerDoc.h"
  8. #include "MsgTracerView.h"
  9.  
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CMsgTracerView
  18.  
  19. IMPLEMENT_DYNCREATE(CMsgTracerView, CEditView)
  20.  
  21. BEGIN_MESSAGE_MAP(CMsgTracerView, CEditView)
  22.     //{{AFX_MSG_MAP(CMsgTracerView)
  23.         // NOTE - the ClassWizard will add and remove mapping macros here.
  24.         //    DO NOT EDIT what you see in these blocks of generated code!
  25.     //}}AFX_MSG_MAP
  26.     // Standard printing commands
  27.     ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
  28.     ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
  29.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
  30. END_MESSAGE_MAP()
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CMsgTracerView construction/destruction
  34.  
  35. CMsgTracerView::CMsgTracerView()
  36. {
  37.     // TODO: add construction code here
  38.  
  39. }
  40.  
  41. CMsgTracerView::~CMsgTracerView()
  42. {
  43. }
  44.  
  45. BOOL CMsgTracerView::PreCreateWindow(CREATESTRUCT& cs)
  46. {
  47.     // TODO: Modify the Window class or styles here by modifying
  48.     //  the CREATESTRUCT cs
  49.  
  50.     BOOL bPreCreated = CEditView::PreCreateWindow(cs);
  51.     cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);    // Enable word-wrapping
  52.  
  53.     return bPreCreated;
  54. }
  55.  
  56. /////////////////////////////////////////////////////////////////////////////
  57. // CMsgTracerView drawing
  58.  
  59. void CMsgTracerView::OnDraw(CDC* pDC)
  60. {
  61.     CMsgTracerDoc* pDoc = GetDocument();
  62.     ASSERT_VALID(pDoc);
  63.  
  64.     // TODO: add draw code for native data here
  65. }
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CMsgTracerView printing
  69.  
  70. BOOL CMsgTracerView::OnPreparePrinting(CPrintInfo* pInfo)
  71. {
  72.     // default CEditView preparation
  73.     return CEditView::OnPreparePrinting(pInfo);
  74. }
  75.  
  76. void CMsgTracerView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
  77. {
  78.     // Default CEditView begin printing.
  79.     CEditView::OnBeginPrinting(pDC, pInfo);
  80. }
  81.  
  82. void CMsgTracerView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
  83. {
  84.     // Default CEditView end printing
  85.     CEditView::OnEndPrinting(pDC, pInfo);
  86. }
  87.  
  88. /////////////////////////////////////////////////////////////////////////////
  89. // CMsgTracerView diagnostics
  90.  
  91. #ifdef _DEBUG
  92. void CMsgTracerView::AssertValid() const
  93. {
  94.     CEditView::AssertValid();
  95. }
  96.  
  97. void CMsgTracerView::Dump(CDumpContext& dc) const
  98. {
  99.     CEditView::Dump(dc);
  100. }
  101.  
  102. CMsgTracerDoc* CMsgTracerView::GetDocument() // non-debug version is inline
  103. {
  104.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMsgTracerDoc)));
  105.     return (CMsgTracerDoc*)m_pDocument;
  106. }
  107. #endif //_DEBUG
  108.  
  109. /////////////////////////////////////////////////////////////////////////////
  110. // CMsgTracerView message handlers
  111.