📄 plugsdiview.cpp
字号:
// PlugSDIView.cpp : implementation of the CPlugSDIView class
//
#include "stdafx.h"
#include "PlugSDI.h"
#include "PlugSDIDoc.h"
#include "PlugSDIView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CPlugSDIView
IMPLEMENT_DYNCREATE(CPlugSDIView, CScrollView)
BEGIN_MESSAGE_MAP(CPlugSDIView, CScrollView)
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
END_MESSAGE_MAP()
// CPlugSDIView construction/destruction
CPlugSDIView::CPlugSDIView()
{
// TODO: add construction code here
}
CPlugSDIView::~CPlugSDIView()
{
}
BOOL CPlugSDIView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CScrollView::PreCreateWindow(cs);
}
// CPlugSDIView drawing
void CPlugSDIView::OnDraw(CDC* /*pDC*/)
{
CPlugSDIDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
void CPlugSDIView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
// TODO: calculate the total size of this view
sizeTotal.cx = sizeTotal.cy = 100;
SetScrollSizes(MM_TEXT, sizeTotal);
}
// CPlugSDIView printing
BOOL CPlugSDIView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CPlugSDIView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CPlugSDIView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
// CPlugSDIView diagnostics
#ifdef _DEBUG
void CPlugSDIView::AssertValid() const
{
CScrollView::AssertValid();
}
void CPlugSDIView::Dump(CDumpContext& dc) const
{
CScrollView::Dump(dc);
}
CPlugSDIDoc* CPlugSDIView::GetDocument() const // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPlugSDIDoc)));
return (CPlugSDIDoc*)m_pDocument;
}
#endif //_DEBUG
// CPlugSDIView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -