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