// 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()
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的大小设置为当前客户区大小