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

  1. // collevw.cpp : implementation of the CCollectView 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 "collect.h"
  15.  
  16. #include "colledoc.h"
  17. #include "collevw.h"
  18.  
  19. #ifdef _DEBUG
  20. #undef THIS_FILE
  21. static char BASED_CODE THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CCollectView
  26.  
  27. IMPLEMENT_DYNCREATE(CCollectView, CView)
  28.  
  29. BEGIN_MESSAGE_MAP(CCollectView, CView)
  30.     //{{AFX_MSG_MAP(CCollectView)
  31.     //}}AFX_MSG_MAP
  32.     // Standard printing commands
  33.     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  34.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  35. END_MESSAGE_MAP()
  36.  
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CCollectView construction/destruction
  39.  
  40. CCollectView::CCollectView()
  41. {
  42. }
  43.  
  44. CCollectView::~CCollectView()
  45. {
  46. }
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CCollectView drawing
  50.  
  51. void CCollectView::OnDraw(CDC* pDC)
  52. {
  53.     CCollectDoc* pDoc = GetDocument();
  54.     ASSERT_VALID(pDoc);
  55.  
  56.     pDC;    // not used
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CCollectView printing
  61.  
  62. BOOL CCollectView::OnPreparePrinting(CPrintInfo* pInfo)
  63. {
  64.     // default preparation
  65.     return DoPreparePrinting(pInfo);
  66. }
  67.  
  68. void CCollectView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  69. {
  70. }
  71.  
  72. void CCollectView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  73. {
  74. }
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // CCollectView diagnostics
  78.  
  79. #ifdef _DEBUG
  80. void CCollectView::AssertValid() const
  81. {
  82.     CView::AssertValid();
  83. }
  84.  
  85. void CCollectView::Dump(CDumpContext& dc) const
  86. {
  87.     CView::Dump(dc);
  88. }
  89.  
  90. CCollectDoc* CCollectView::GetDocument() // non-debug version is inline
  91. {
  92.     return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
  93. }
  94. #endif //_DEBUG
  95.  
  96. /////////////////////////////////////////////////////////////////////////////
  97. // CCollectView message handlers
  98.