www.pudn.com > c++或C下如何使用多线程.zip > TrdDemoView.cpp
// TrdDemoView.cpp : implementation of the CTrdDemoView class
//
#include "stdafx.h"
#include "TrdDemo.h"
#include "TrdDemoDoc.h"
#include "TrdDemoView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView
IMPLEMENT_DYNCREATE(CTrdDemoView, CView)
BEGIN_MESSAGE_MAP(CTrdDemoView, CView)
//{{AFX_MSG_MAP(CTrdDemoView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView construction/destruction
CTrdDemoView::CTrdDemoView()
{
// TODO: add construction code here
}
CTrdDemoView::~CTrdDemoView()
{
}
BOOL CTrdDemoView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView drawing
void CTrdDemoView::OnDraw(CDC* pDC)
{
CTrdDemoDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView printing
BOOL CTrdDemoView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CTrdDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CTrdDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView diagnostics
#ifdef _DEBUG
void CTrdDemoView::AssertValid() const
{
CView::AssertValid();
}
void CTrdDemoView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CTrdDemoDoc* CTrdDemoView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTrdDemoDoc)));
return (CTrdDemoDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTrdDemoView message handlers