// MapEditorView.cpp : CMapEditorView 類的實現
//
#include "stdafx.h"
#include "MapEditor.h"
#include "MapEditorDoc.h"
#include "MapEditorView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMapEditorView
IMPLEMENT_DYNCREATE(CMapEditorView, CView)
BEGIN_MESSAGE_MAP(CMapEditorView, CView)
// 標準打印命令
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()
// CMapEditorView 構造/析構
CMapEditorView::CMapEditorView()
{
// TODO: 在此處添加構造代碼
}
CMapEditorView::~CMapEditorView()
{
}
BOOL CMapEditorView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: 在此處通過修改
// CREATESTRUCT cs 來修改窗口類或樣式
return CView::PreCreateWindow(cs);
}
// CMapEditorView 繪制
void CMapEditorView::OnDraw(CDC* /*pDC*/)
{
CMapEditorDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
// TODO: 在此處為本機數據添加繪制代碼
}
// CMapEditorView 打印
BOOL CMapEditorView::OnPreparePrinting(CPrintInfo* pInfo)
{
// 默認準備
return DoPreparePrinting(pInfo);
}
void CMapEditorView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: 添加額外的打印前進行的初始化過程
}
void CMapEditorView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: 添加打印后進行的清除過程
}
// CMapEditorView 診斷
#ifdef _DEBUG
void CMapEditorView::AssertValid() const
{
CView::AssertValid();
}
void CMapEditorView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMapEditorDoc* CMapEditorView::GetDocument() const // 非調試版本是內聯的
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMapEditorDoc)));
return (CMapEditorDoc*)m_pDocument;
}
#endif //_DEBUG
// CMapEditorView 消息處理程序