This repository has been archived on 2022-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
Multichannel-Analyzer/MCA/MCAView.cpp

96 lines
1.9 KiB
C++

// MCAView.cpp: CMCAView 类的实现
//
#include "pch.h"
#include "framework.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "MCA.h"
#endif
#include "MCADoc.h"
#include "MCAView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMCAView
IMPLEMENT_DYNCREATE(CMCAView, CView)
BEGIN_MESSAGE_MAP(CMCAView, 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()
// CMCAView 构造/析构
CMCAView::CMCAView() noexcept {
// TODO: 在此处添加构造代码
}
CMCAView::~CMCAView() {
}
BOOL CMCAView::PreCreateWindow(CREATESTRUCT& cs) {
// TODO: 在此处通过修改
// CREATESTRUCT cs 来修改窗口类或样式
return CView::PreCreateWindow(cs);
}
// CMCAView 绘图
void CMCAView::OnDraw(CDC* /*pDC*/) {
CMCADoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
// TODO: 在此处为本机数据添加绘制代码
}
// CMCAView 打印
BOOL CMCAView::OnPreparePrinting(CPrintInfo* pInfo) {
// 默认准备
return DoPreparePrinting(pInfo);
}
void CMCAView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) {
// TODO: 添加额外的打印前进行的初始化过程
}
void CMCAView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) {
// TODO: 添加打印后进行的清理过程
}
// CMCAView 诊断
#ifdef _DEBUG
void CMCAView::AssertValid() const {
CView::AssertValid();
}
void CMCAView::Dump(CDumpContext& dc) const {
CView::Dump(dc);
}
CMCADoc* CMCAView::GetDocument() const { // 非调试版本是内联的
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMCADoc)));
return (CMCADoc*)m_pDocument;
}
#endif //_DEBUG
// CMCAView 消息处理程序