// 07EditorCharacterView.cpp : CMy07EditorCharacterView 類別的實作
//

#include "stdafx.h"
#include "07EditorCharacter.h"

#include "07EditorCharacterDoc.h"
#include "07EditorCharacterView.h"

#include "Character.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CMy07EditorCharacterView

IMPLEMENT_DYNCREATE(CMy07EditorCharacterView, CView)

BEGIN_MESSAGE_MAP(CMy07EditorCharacterView, 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()

// CMy07EditorCharacterView 建構/解構

CMy07EditorCharacterView::CMy07EditorCharacterView()
{
	// TODO: 在此處加入建構程式碼

}

CMy07EditorCharacterView::~CMy07EditorCharacterView()
{
}

BOOL CMy07EditorCharacterView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: 經由修改 CREATESTRUCT cs 達到修改視窗類別或樣式的目的

	return CView::PreCreateWindow(cs);
}

// CMy07EditorCharacterView 描繪

void CMy07EditorCharacterView::OnDraw(CDC* pDC)
{
	CMy07EditorCharacterDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: 在此加入原生資料的繪製程式碼
    CCharacter x('a', 100, 200);
    x.draw(pDC);
}


// CMy07EditorCharacterView 列印

BOOL CMy07EditorCharacterView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// 預設的準備
	return DoPreparePrinting(pInfo);
}

void CMy07EditorCharacterView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 列印前加入額外的初始設定
}

void CMy07EditorCharacterView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 列印後加入清除
}


// CMy07EditorCharacterView 診斷

#ifdef _DEBUG
void CMy07EditorCharacterView::AssertValid() const
{
	CView::AssertValid();
}

void CMy07EditorCharacterView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CMy07EditorCharacterDoc* CMy07EditorCharacterView::GetDocument() const // 非偵錯版本是內嵌
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMy07EditorCharacterDoc)));
	return (CMy07EditorCharacterDoc*)m_pDocument;
}
#endif //_DEBUG


// CMy07EditorCharacterView 訊息處理常式
