e0605view.cpp
来自「Visualc++6.0自学手册第6章」· C++ 代码 · 共 105 行
CPP
105 行
// E0605View.cpp : implementation of the CE0605View class
//
#include "stdafx.h"
#include "E0605.h"
#include "E0605Doc.h"
#include "E0605View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CE0605View
IMPLEMENT_DYNCREATE(CE0605View, CView)
BEGIN_MESSAGE_MAP(CE0605View, CView)
//{{AFX_MSG_MAP(CE0605View)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CE0605View construction/destruction
CE0605View::CE0605View()
{
// TODO: add construction code here
}
CE0605View::~CE0605View()
{
}
BOOL CE0605View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CE0605View drawing
void CE0605View::OnDraw(CDC* pDC)
{
CE0605Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CE0605View printing
BOOL CE0605View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CE0605View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CE0605View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CE0605View diagnostics
#ifdef _DEBUG
void CE0605View::AssertValid() const
{
CView::AssertValid();
}
void CE0605View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CE0605Doc* CE0605View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CE0605Doc)));
return (CE0605Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CE0605View message handlers
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?