home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / oldbars / oldbavw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.7 KB  |  104 lines

  1. // oldbavw.cpp : implementation of the COldbarsView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "oldbars.h"
  15.  
  16. #include "oldbadoc.h"
  17. #include "oldbavw.h"
  18.  
  19. #ifdef _DEBUG
  20. #undef THIS_FILE
  21. static char BASED_CODE THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // COldbarsView
  26.  
  27. IMPLEMENT_DYNCREATE(COldbarsView, CView)
  28.  
  29. BEGIN_MESSAGE_MAP(COldbarsView, CView)
  30.     //{{AFX_MSG_MAP(COldbarsView)
  31.         // NOTE - the ClassWizard will add and remove mapping macros here.
  32.         //    DO NOT EDIT what you see in these blocks of generated code!
  33.     //}}AFX_MSG_MAP
  34.     // Standard printing commands
  35.     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  36.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  37. END_MESSAGE_MAP()
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // COldbarsView construction/destruction
  41.  
  42. COldbarsView::COldbarsView()
  43. {
  44.     // TODO: add construction code here
  45.  
  46. }
  47.  
  48. COldbarsView::~COldbarsView()
  49. {
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // COldbarsView drawing
  54.  
  55. void COldbarsView::OnDraw(CDC* pDC)
  56. {
  57.     COldbarsDoc* pDoc = GetDocument();
  58.     ASSERT_VALID(pDoc);
  59.  
  60.     // TODO: add draw code for native data here
  61. }
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64. // COldbarsView printing
  65.  
  66. BOOL COldbarsView::OnPreparePrinting(CPrintInfo* pInfo)
  67. {
  68.     // default preparation
  69.     return DoPreparePrinting(pInfo);
  70. }
  71.  
  72. void COldbarsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  73. {
  74.     // TODO: add extra initialization before printing
  75. }
  76.  
  77. void COldbarsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  78. {
  79.     // TODO: add cleanup after printing
  80. }
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83. // COldbarsView diagnostics
  84.  
  85. #ifdef _DEBUG
  86. void COldbarsView::AssertValid() const
  87. {
  88.     CView::AssertValid();
  89. }
  90.  
  91. void COldbarsView::Dump(CDumpContext& dc) const
  92. {
  93.     CView::Dump(dc);
  94. }
  95.  
  96. COldbarsDoc* COldbarsView::GetDocument() // non-debug version is inline
  97. {
  98.     return STATIC_DOWNCAST(COldbarsDoc, m_pDocument);
  99. }
  100. #endif //_DEBUG
  101.  
  102. /////////////////////////////////////////////////////////////////////////////
  103. // COldbarsView message handlers
  104.