home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / shaw / vbits32 / vbitsvw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-13  |  2.4 KB  |  104 lines

  1. // vbitsvw.cpp : implementation of the CVbits32View class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "vbits32.h"
  6.  
  7. #include "vbitsdoc.h"
  8. #include "vbitsvw.h"
  9. #include "newdialo.h"
  10.  
  11. #ifdef _DEBUG
  12. #undef THIS_FILE
  13. static char BASED_CODE THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CVbits32View
  18.  
  19. IMPLEMENT_DYNCREATE(CVbits32View, CEditView)
  20.  
  21. BEGIN_MESSAGE_MAP(CVbits32View, CEditView)
  22.     //{{AFX_MSG_MAP(CVbits32View)
  23.     ON_COMMAND(ID_VIEW_NEWDIALOG, OnViewNewdialog)
  24.     //}}AFX_MSG_MAP
  25.     // Standard printing commands
  26.     ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
  27.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CVbits32View construction/destruction
  32.  
  33. CVbits32View::CVbits32View()
  34. {
  35.     // TODO: add construction code here
  36.  
  37. }
  38.  
  39. CVbits32View::~CVbits32View()
  40. {
  41. }
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CVbits32View drawing
  45.  
  46. void CVbits32View::OnDraw(CDC* pDC)
  47. {
  48.     CVbits32Doc* pDoc = GetDocument();
  49.     ASSERT_VALID(pDoc);
  50.  
  51.     // TODO: add draw code for native data here
  52. }
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CVbits32View printing
  56.  
  57. BOOL CVbits32View::OnPreparePrinting(CPrintInfo* pInfo)
  58. {
  59.     // default CEditView preparation
  60.     return CEditView::OnPreparePrinting(pInfo);
  61. }
  62.  
  63. void CVbits32View::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
  64. {
  65.     // Default CEditView begin printing.
  66.     CEditView::OnBeginPrinting(pDC, pInfo);
  67. }
  68.  
  69. void CVbits32View::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
  70. {
  71.     // Default CEditView end printing
  72.     CEditView::OnEndPrinting(pDC, pInfo);
  73. }
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. // CVbits32View diagnostics
  77.  
  78. #ifdef _DEBUG
  79. void CVbits32View::AssertValid() const
  80. {
  81.     CEditView::AssertValid();
  82. }
  83.  
  84. void CVbits32View::Dump(CDumpContext& dc) const
  85. {
  86.     CEditView::Dump(dc);
  87. }
  88.  
  89. CVbits32Doc* CVbits32View::GetDocument() // non-debug version is inline
  90. {
  91.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVbits32Doc)));
  92.     return (CVbits32Doc*)m_pDocument;
  93. }
  94. #endif //_DEBUG
  95.  
  96. /////////////////////////////////////////////////////////////////////////////
  97. // CVbits32View message handlers
  98.  
  99. void CVbits32View::OnViewNewdialog() 
  100. {
  101.     CNewDialog newDlg;
  102.     newDlg.DoModal();    
  103. }
  104.