📄 subclassview.cpp
字号:
// SubClassView.cpp : implementation of the CSubClassView class
//
#include "stdafx.h"
#include "SubClass.h"
#include "SubClassDoc.h"
#include "SubClassView.h"
#include "SubClassDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSubClassView
IMPLEMENT_DYNCREATE(CSubClassView, CView)
BEGIN_MESSAGE_MAP(CSubClassView, CView)
//{{AFX_MSG_MAP(CSubClassView)
ON_COMMAND(ID_EDIT_TEST, OnEditTest)
//}}AFX_MSG_MAP
// 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()
/////////////////////////////////////////////////////////////////////////////
// CSubClassView construction/destruction
CSubClassView::CSubClassView()
{
// TODO: add construction code here
}
CSubClassView::~CSubClassView()
{
}
BOOL CSubClassView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSubClassView drawing
void CSubClassView::OnDraw(CDC* pDC)
{
CSubClassDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CSubClassView printing
BOOL CSubClassView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSubClassView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSubClassView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSubClassView diagnostics
#ifdef _DEBUG
void CSubClassView::AssertValid() const
{
CView::AssertValid();
}
void CSubClassView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CSubClassDoc* CSubClassView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSubClassDoc)));
return (CSubClassDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSubClassView message handlers
void CSubClassView::OnEditTest()
{
// TODO: Add your command handler code here
CSubClassDialog subclassDialog;
subclassDialog.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -