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

  1. // dockvw.cpp : implementation of the CDockView 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 "docktool.h"
  15.  
  16. #include "dockdoc.h"
  17. #include "dockvw.h"
  18.  
  19. #ifdef _DEBUG
  20. #undef THIS_FILE
  21. static char BASED_CODE THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CDockView
  26.  
  27. IMPLEMENT_DYNCREATE(CDockView, CView)
  28.  
  29. BEGIN_MESSAGE_MAP(CDockView, CView)
  30.     //{{AFX_MSG_MAP(CDockView)
  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. END_MESSAGE_MAP()
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CDockView construction/destruction
  38.  
  39. CDockView::CDockView()
  40. {
  41.     // TODO: add construction code here
  42.  
  43. }
  44.  
  45. CDockView::~CDockView()
  46. {
  47. }
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CDockView drawing
  51.  
  52. void CDockView::OnDraw(CDC* pDC)
  53. {
  54.     CDockDoc* pDoc = GetDocument();
  55.     ASSERT_VALID(pDoc);
  56.     pDC;    // unused right now
  57.  
  58.     // TODO: add draw code for native data here
  59. }
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CDockView diagnostics
  63.  
  64. #ifdef _DEBUG
  65. void CDockView::AssertValid() const
  66. {
  67.     CView::AssertValid();
  68. }
  69.  
  70. void CDockView::Dump(CDumpContext& dc) const
  71. {
  72.     CView::Dump(dc);
  73. }
  74.  
  75. CDockDoc* CDockView::GetDocument() // non-debug version is inline
  76. {
  77.     return STATIC_DOWNCAST(CDockDoc, m_pDocument);
  78. }
  79. #endif //_DEBUG
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CDockView message handlers
  83.