home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c08 / listview / dbaview.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.9 KB  |  84 lines

  1. // DBAccessView.cpp : implementation of the CDBAccessView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "DBAccess.h"
  6.  
  7. #include "DBADoc.h"
  8. #include "DBAView.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. // CDBAccessView
  18.  
  19. IMPLEMENT_DYNCREATE(CDBAccessView, CView)
  20.  
  21. BEGIN_MESSAGE_MAP(CDBAccessView, CView)
  22.     //{{AFX_MSG_MAP(CDBAccessView)
  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. END_MESSAGE_MAP()
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CDBAccessView construction/destruction
  31.  
  32. CDBAccessView::CDBAccessView()
  33. {
  34.     // TODO: add construction code here
  35.  
  36. }
  37.  
  38. CDBAccessView::~CDBAccessView()
  39. {
  40. }
  41.  
  42. BOOL CDBAccessView::PreCreateWindow(CREATESTRUCT& cs)
  43. {
  44.     // TODO: Modify the Window class or styles here by modifying
  45.     //  the CREATESTRUCT cs
  46.  
  47.     return CView::PreCreateWindow(cs);
  48. }
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CDBAccessView drawing
  52.  
  53. void CDBAccessView::OnDraw(CDC* pDC)
  54. {
  55.     CDBAccessDoc* pDoc = GetDocument();
  56.     ASSERT_VALID(pDoc);
  57.  
  58.     // TODO: add draw code for native data here
  59. }
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CDBAccessView diagnostics
  63.  
  64. #ifdef _DEBUG
  65. void CDBAccessView::AssertValid() const
  66. {
  67.     CView::AssertValid();
  68. }
  69.  
  70. void CDBAccessView::Dump(CDumpContext& dc) const
  71. {
  72.     CView::Dump(dc);
  73. }
  74.  
  75. CDBAccessDoc* CDBAccessView::GetDocument() // non-debug version is inline
  76. {
  77.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDBAccessDoc)));
  78.     return (CDBAccessDoc*)m_pDocument;
  79. }
  80. #endif //_DEBUG
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83. // CDBAccessView message handlers
  84.