home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / msmqocm.cab / testview.cpp < prev    next >
C/C++ Source or Header  |  1997-10-06  |  2KB  |  97 lines

  1. // testView.cpp : implementation of the CTestView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MQApitst.h"
  6. #include "mainfrm.h"
  7.  
  8. #include "testDoc.h"
  9. #include "testView.h"
  10.  
  11. #ifdef _DEBUG
  12. #define new DEBUG_NEW
  13. #undef THIS_FILE
  14. static char THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CTestView
  19.  
  20. IMPLEMENT_DYNCREATE(CTestView, CEditView)
  21.  
  22. BEGIN_MESSAGE_MAP(CTestView, CEditView)
  23.     //{{AFX_MSG_MAP(CTestView)
  24.     ON_WM_CREATE()
  25.     //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CTestView construction/destruction
  30.  
  31. CTestView::CTestView()
  32. {
  33.     // TODO: add construction code here
  34.  
  35. }
  36.  
  37. CTestView::~CTestView()
  38. {
  39. }
  40.  
  41. BOOL CTestView::PreCreateWindow(CREATESTRUCT& cs)
  42. {
  43.     // TODO: Modify the Window class or styles here by modifying
  44.     //  the CREATESTRUCT cs
  45.  
  46.     BOOL bPreCreated = CEditView::PreCreateWindow(cs);
  47.     cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);    // Enable word-wrapping
  48.  
  49.     return bPreCreated;
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CTestView drawing
  54.  
  55. void CTestView::OnDraw(CDC* pDC)
  56. {
  57.     CTestDoc* pDoc = GetDocument();
  58.     ASSERT_VALID(pDoc);
  59.  
  60.     // TODO: add draw code for native data here
  61. }
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CTestView diagnostics
  65.  
  66. #ifdef _DEBUG
  67. void CTestView::AssertValid() const
  68. {
  69.     CEditView::AssertValid();
  70. }
  71.  
  72. void CTestView::Dump(CDumpContext& dc) const
  73. {
  74.     CEditView::Dump(dc);
  75. }
  76.  
  77. CTestDoc* CTestView::GetDocument() // non-debug version is inline
  78. {
  79.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTestDoc)));
  80.     return (CTestDoc*)m_pDocument;
  81. }
  82. #endif //_DEBUG
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // CTestView message handlers
  86.  
  87. int CTestView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  88. {
  89.     if (CEditView::OnCreate(lpCreateStruct) == -1)
  90.         return -1;
  91.     
  92.     // TODO: Add your specialized creation code here
  93.     
  94.     pMainView = this;
  95.     return 0;
  96. }
  97.