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/ControlView.cpp

65 lines
1.1 KiB
C++
Raw Normal View History

2022-03-20 15:14:44 +08:00
// ControlView.cpp: 实现文件
//
#include "pch.h"
#include "math.h"
#include "MCA.h"
#include "MCADoc.h"
#include "MainFrm.h"
#include "ControlView.h"
// CControlView
IMPLEMENT_DYNCREATE(CControlView, CFormView)
CControlView::CControlView()
: CFormView(IDD_DIALOG_CONTROL)
{
}
CControlView::~CControlView()
{
}
void CControlView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CControlView, CFormView)
ON_WM_SIZE()
2022-03-20 15:14:44 +08:00
END_MESSAGE_MAP()
// CControlView 诊断
#ifdef _DEBUG
void CControlView::AssertValid() const
{
CFormView::AssertValid();
}
#ifndef _WIN32_WCE
void CControlView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif
#endif //_DEBUG
// CControlView 消息处理程序
void CControlView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
CRect rect;
GetClientRect(&rect); // 获取当前客户区view大小
CSize size;
size.cx = rect.right - rect.left;
size.cy = rect.bottom - rect.top;
SetScrollSizes(MM_HIMETRIC, size); // 将CScrollView的大小设置为当前客户区大小
}