【VC开源代码栏目提醒】:网学会员鉴于大家对VC开源代码十分关注,论文会员在此为大家搜集整理了“ex82View.cpp”一文,供大家参考学习
// ex82View.cpp : Cex82View 类的实现
//
#include "stdafx.h"
#include "ex82.h"
#include "ex82Doc.h"
#include "ex82View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// Cex82View
IMPLEMENT_DYNCREATE(Cex82View, CView)
BEGIN_MESSAGE_MAP(Cex82View, CView)
// 标准打印命令
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()
// Cex82View 构造/销毁
Cex82View::Cex82View()
{
// TODO: 在此处添加构造代码
}
Cex82View::~Cex82View()
{
}
BOOL Cex82View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: 在此处通过修改 CREATESTRUCT cs 来修改窗口类或
// 样式
return CView::PreCreateWindow(cs);
}
// Cex82View 绘制
void Cex82View::OnDraw(CDC* /*pDC*/)
{
Cex82Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: 在此处为本机数据添加绘制代码
}
// Cex82View 打印
BOOL Cex82View::OnPreparePrinting(CPrintInfo* pInfo)
{
// 默认准备
return DoPreparePrinting(pInfo);
}
void Cex82View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: 打印前添加额外的初始化
}
void Cex82View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: 打印后添加清除过程
}
// Cex82View 诊断
#ifdef _DEBUG
void Cex82View::AssertValid() const
{
CView::AssertValid();
}
void Cex82View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
Cex82Doc* Cex82View::GetDocument() const // 非调试版本是内联的
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cex82Doc)));
return (Cex82Doc*)m_pDocument;
}
#endif //_DEBUG
// Cex82View 消息处理
程序