home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / ript16 / sample / rtab_vw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-16  |  2.3 KB  |  105 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.     ON_COMMAND(IDD_DOMODELESSDIALOG, OnDoRipTABMDialog)
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CRtab_samView construction/destruction
  32.  
  33. CRtab_samView::CRtab_samView()
  34. {
  35.     CheckBoxStatus="None.";
  36.     RadioButtonStatus="None.";
  37.     EditControlStatus="None.";
  38. }
  39.  
  40. CRtab_samView::~CRtab_samView()
  41. {
  42. }
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CRtab_samView drawing
  46.  
  47. void CRtab_samView::OnDraw(CDC* pDC)
  48. {
  49.     CString OutString;
  50.  
  51.     CRtab_samDoc* pDoc = GetDocument();
  52.  
  53.     
  54.     OutString="Check Box Status : ";
  55.     pDC->TextOut(10, 10, OutString);
  56.     pDC->TextOut(160, 10, CheckBoxStatus);
  57.  
  58.     OutString="Radio Button Status : ";
  59.     pDC->TextOut(10, 40, OutString);
  60.     pDC->TextOut(160, 40, RadioButtonStatus);
  61.     
  62.     OutString="Edit Control Status : ";
  63.     pDC->TextOut(10, 70, OutString);
  64.     pDC->TextOut(160, 70, EditControlStatus);
  65. }
  66.  
  67.  
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CRtab_samView diagnostics
  71.  
  72. #ifdef _DEBUG
  73. void CRtab_samView::AssertValid() const
  74. {
  75.     CView::AssertValid();
  76. }
  77.  
  78. void CRtab_samView::Dump(CDumpContext& dc) const
  79. {
  80.     CView::Dump(dc);
  81. }
  82.  
  83. CRtab_samDoc* CRtab_samView::GetDocument() // non-debug version is inline
  84. {
  85.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRtab_samDoc)));
  86.     return (CRtab_samDoc*) m_pDocument;
  87. }
  88.  
  89. #endif //_DEBUG
  90.  
  91. /////////////////////////////////////////////////////////////////////////////
  92. // CRtab_samView message handlers
  93.  
  94. void CRtab_samView::OnDoRipTABDialog()
  95. {
  96.     CRTabDialog diag(this);
  97.     diag.DoModal();
  98.     InvalidateRect(NULL, TRUE);
  99. }
  100.  
  101. void CRtab_samView::OnDoRipTABMDialog()
  102. {
  103.     CRTabMDialog* diag= new CRTabMDialog(this);
  104. }
  105.