home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / ript32 / sample / rtab_vw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-21  |  2.1 KB  |  99 lines

  1. // rtab_vw.cpp : implementation of the CRtab_samView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "rtab_sam.h"
  6.  
  7. #include "rtab_doc.h"
  8. #include "rtab_vw.h"
  9.  
  10. #include "..\include\rip_tabs.h"
  11. #include "rtabdial.h"
  12.  
  13. #ifdef _DEBUG
  14. #undef THIS_FILE
  15. static char BASED_CODE THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CRtab_samView
  20.  
  21. IMPLEMENT_DYNCREATE(CRtab_samView, CView)
  22.  
  23. BEGIN_MESSAGE_MAP(CRtab_samView, CView)
  24.     //{{AFX_MSG_MAP(CRtab_samView)
  25.     ON_COMMAND(IDD_DODIALOG, OnDoRipTABDialog)
  26.     //}}AFX_MSG_MAP
  27. END_MESSAGE_MAP()
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CRtab_samView construction/destruction
  31.  
  32. CRtab_samView::CRtab_samView()
  33. {
  34.     CheckBoxStatus="None.";
  35.     RadioButtonStatus="None.";
  36.     EditControlStatus="None.";
  37. }
  38.  
  39. CRtab_samView::~CRtab_samView()
  40. {
  41. }
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CRtab_samView drawing
  45.  
  46. void CRtab_samView::OnDraw(CDC* pDC)
  47. {
  48.     CString OutString;
  49.  
  50.     CRtab_samDoc* pDoc = GetDocument();
  51.  
  52.     
  53.     OutString="Check Box Status : ";
  54.     pDC->TextOut(10, 10, OutString);
  55.     pDC->TextOut(160, 10, CheckBoxStatus);
  56.  
  57.     OutString="Radio Button Status : ";
  58.     pDC->TextOut(10, 40, OutString);
  59.     pDC->TextOut(160, 40, RadioButtonStatus);
  60.     
  61.     OutString="Edit Control Status : ";
  62.     pDC->TextOut(10, 70, OutString);
  63.     pDC->TextOut(160, 70, EditControlStatus);
  64. }
  65.  
  66.  
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CRtab_samView diagnostics
  70.  
  71. #ifdef _DEBUG
  72. void CRtab_samView::AssertValid() const
  73. {
  74.     CView::AssertValid();
  75. }
  76.  
  77. void CRtab_samView::Dump(CDumpContext& dc) const
  78. {
  79.     CView::Dump(dc);
  80. }
  81.  
  82. CRtab_samDoc* CRtab_samView::GetDocument() // non-debug version is inline
  83. {
  84.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRtab_samDoc)));
  85.     return (CRtab_samDoc*) m_pDocument;
  86. }
  87.  
  88. #endif //_DEBUG
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91. // CRtab_samView message handlers
  92.  
  93. void CRtab_samView::OnDoRipTABDialog()
  94. {
  95.     CRTabDialog diag(this);
  96.     diag.DoModal();
  97.     InvalidateRect(NULL, TRUE);
  98. }
  99.