www.gusucode.com > VC++三子棋游戏源码(类似五子棋)-源码程序 > VC++三子棋游戏源码(类似五子棋)-源码程序\code\SanQiView.cpp

    // SanQiView.cpp : implementation of the CSanQiView class
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "SanQi.h"

#include "SanQiDoc.h"
#include "SanQiView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSanQiView

IMPLEMENT_DYNCREATE(CSanQiView, CView)

BEGIN_MESSAGE_MAP(CSanQiView, CView)
	//{{AFX_MSG_MAP(CSanQiView)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CSanQiView construction/destruction

CSanQiView::CSanQiView()
{
	// TODO: add construction code here

}

CSanQiView::~CSanQiView()
{
}

BOOL CSanQiView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CSanQiView drawing

void CSanQiView::OnDraw(CDC* pDC)
{
	CSanQiDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CSanQiView printing

BOOL CSanQiView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CSanQiView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CSanQiView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CSanQiView diagnostics

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

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

CSanQiDoc* CSanQiView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSanQiDoc)));
	return (CSanQiDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CSanQiView message handlers