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++
Raw Normal View History

2022-03-19 20:43:29 +08:00

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