📄 mycoolappview.cpp
字号:
// MyCoolAppView.cpp : implementation of the CMyCoolAppView class
//
#include "stdafx.h"
#include "MyCoolApp.h"
#include "MyCoolAppDoc.h"
#include "MyCoolAppView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMyCoolAppView
IMPLEMENT_DYNCREATE(CMyCoolAppView, CView)
BEGIN_MESSAGE_MAP(CMyCoolAppView, CView)
// Standard printing commands
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()
// CMyCoolAppView construction/destruction
CMyCoolAppView::CMyCoolAppView()
{
// TODO: add construction code here
}
CMyCoolAppView::~CMyCoolAppView()
{
}
BOOL CMyCoolAppView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
// CMyCoolAppView drawing
void CMyCoolAppView::OnDraw(CDC* /*pDC*/)
{
CMyCoolAppDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
// TODO: add draw code for native data here
}
// CMyCoolAppView printing
BOOL CMyCoolAppView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CMyCoolAppView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CMyCoolAppView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
// CMyCoolAppView diagnostics
#ifdef _DEBUG
void CMyCoolAppView::AssertValid() const
{
CView::AssertValid();
}
void CMyCoolAppView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMyCoolAppDoc* CMyCoolAppView::GetDocument() const // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyCoolAppDoc)));
return (CMyCoolAppDoc*)m_pDocument;
}
#endif //_DEBUG
// CMyCoolAppView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -