107 lines
2.4 KiB
C++
107 lines
2.4 KiB
C++
// testView.cpp : implementation of the CTestView class
|
|
//
|
|
//=--------------------------------------------------------------------------=
|
|
// Copyright 1997-1999 Microsoft Corporation. All Rights Reserved.
|
|
//
|
|
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
|
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
|
// PARTICULAR PURPOSE.
|
|
//=--------------------------------------------------------------------------=
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
#include "MQApitst.h"
|
|
#include "mainfrm.h"
|
|
|
|
#include "testDoc.h"
|
|
#include "testView.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CTestView
|
|
|
|
IMPLEMENT_DYNCREATE(CTestView, CEditView)
|
|
|
|
BEGIN_MESSAGE_MAP(CTestView, CEditView)
|
|
//{{AFX_MSG_MAP(CTestView)
|
|
ON_WM_CREATE()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CTestView construction/destruction
|
|
|
|
CTestView::CTestView()
|
|
{
|
|
// TODO: add construction code here
|
|
|
|
}
|
|
|
|
CTestView::~CTestView()
|
|
{
|
|
}
|
|
|
|
BOOL CTestView::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
// TODO: Modify the Window class or styles here by modifying
|
|
// the CREATESTRUCT cs
|
|
|
|
BOOL bPreCreated = CEditView::PreCreateWindow(cs);
|
|
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
|
|
|
|
return bPreCreated;
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CTestView drawing
|
|
|
|
void CTestView::OnDraw(CDC* pDC)
|
|
{
|
|
CTestDoc* pDoc = GetDocument();
|
|
ASSERT_VALID(pDoc);
|
|
|
|
// TODO: add draw code for native data here
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CTestView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CTestView::AssertValid() const
|
|
{
|
|
CEditView::AssertValid();
|
|
}
|
|
|
|
void CTestView::Dump(CDumpContext& dc) const
|
|
{
|
|
CEditView::Dump(dc);
|
|
}
|
|
|
|
CTestDoc* CTestView::GetDocument() // non-debug version is inline
|
|
{
|
|
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTestDoc)));
|
|
return (CTestDoc*)m_pDocument;
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CTestView message handlers
|
|
|
|
int CTestView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
{
|
|
if (CEditView::OnCreate(lpCreateStruct) == -1)
|
|
return -1;
|
|
|
|
// TODO: Add your specialized creation code here
|
|
|
|
pMainView = this;
|
|
return 0;
|
|
}
|