home *** CD-ROM | disk | FTP | other *** search
/ Master Visual C++ 1.5 / MASTERVC15.ISO / vcprog / original / ch08 / chkbox / chkbovw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-16  |  1.8 KB  |  89 lines

  1. // chkbovw.cpp : implementation of the CChkboxView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "chkbox.h"
  6.  
  7. #include "chkbodoc.h"
  8. #include "chkbovw.h"
  9.  
  10. #ifdef _DEBUG
  11. #undef THIS_FILE
  12. static char BASED_CODE THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CChkboxView
  18.  
  19. IMPLEMENT_DYNCREATE(CChkboxView, CView)
  20.  
  21. BEGIN_MESSAGE_MAP(CChkboxView, CView)
  22.     //{{AFX_MSG_MAP(CChkboxView)
  23.     ON_COMMAND(ID_FILE_TRYIT, OnFileTryit)
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CChkboxView construction/destruction
  29.  
  30. CChkboxView::CChkboxView()
  31. {
  32.     // TODO: add construction code here
  33. }
  34.  
  35. CChkboxView::~CChkboxView()
  36. {
  37. }
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CChkboxView drawing
  41.  
  42. void CChkboxView::OnDraw(CDC* pDC)
  43. {
  44.     CChkboxDoc* pDoc = GetDocument();
  45.     ASSERT_VALID(pDoc);
  46.  
  47.     // TODO: add draw code for native data here
  48. }
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CChkboxView diagnostics
  52.  
  53. #ifdef _DEBUG
  54. void CChkboxView::AssertValid() const
  55. {
  56.     CView::AssertValid();
  57. }
  58.  
  59. void CChkboxView::Dump(CDumpContext& dc) const
  60. {
  61.     CView::Dump(dc);
  62. }
  63.  
  64. CChkboxDoc* CChkboxView::GetDocument() // non-debug version is inline
  65. {
  66.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CChkboxDoc)));
  67.     return (CChkboxDoc*)m_pDocument;
  68. }
  69. #endif //_DEBUG
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CChkboxView message handlers
  73.  
  74. void CChkboxView::OnFileTryit()
  75. {
  76.     // TODO: Add your command handler code here
  77.     
  78.      //////////////////////
  79.      // MY CODE STARTS HERE
  80.      //////////////////////
  81.  
  82.      dlg.DoModal();
  83.  
  84.      ////////////////////
  85.      // MY CODE ENDS HERE
  86.      ////////////////////
  87.  
  88. }
  89.