【VC开源代码栏目提醒】:网学会员--在 VC开源代码编辑为广大网友搜集整理了:Ex04_2View.cpp绩等信息,祝愿广大网友取得需要的信息,参考学习。
// Ex04_2View.cpp : implementation of the CEx04_2View class
//
#include "stdafx.h"
#include "Ex04_2.h"
#include "Ex04_2Doc.h"
#include "Ex04_2View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View
IMPLEMENT_DYNCREATE(CEx04_2View, CView)
BEGIN_MESSAGE_MAP(CEx04_2View, CView)
//{{AFX_MSG_MAP(CEx04_2View)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View construction/destruction
CEx04_2View::CEx04_2View()
{
// TODO: add construction code here
}
CEx04_2View::~CEx04_2View()
{
}
BOOL CEx04_2View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View drawing
void CEx04_2View::OnDraw(CDC* pDC)
{
CEx04_2Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->TextOut(100,50,pDoc->GetString());
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View printing
BOOL CEx04_2View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CEx04_2View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CEx04_2View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View diagnostics
#ifdef _DEBUG
void CEx04_2View::AssertValid() const
{
CView::AssertValid();
}
void CEx04_2View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CEx04_2Doc* CEx04_2View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx04_2Doc)));
return (CEx04_2Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx04_2View message handlers
上一篇:
Ex04_2Doc.cpp
下一篇:
科研管理杂志简介