www.gusucode.com > VC++拼图游戏源代码源码程序 > VC++拼图游戏源代码源码程序\code\同源、不同源,多视实现\PointView.cpp

    //Download by http://www.NewXing.com
// PointView.cpp : implementation file
//

#include "stdafx.h"
#include "dyn_splid_view.h"
#include "PointView.h"

#include "dyn_splid_viewDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPointView

IMPLEMENT_DYNCREATE(CPointView, CView)

CPointView::CPointView()
{
}

CPointView::~CPointView()
{
}


BEGIN_MESSAGE_MAP(CPointView, CView)
	//{{AFX_MSG_MAP(CPointView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPointView drawing

void CPointView::OnDraw(CDC* pDC)
{
/*	//获取同源文档控制权
	CDyn_splid_viewDoc* pDoc = (CDyn_splid_viewDoc*)GetDocument();

	//原始坐标位置
	int x = 0;
	int y = 200;  
	//新的绘线目的位置
	int newX,newY;
	
	//创建一个宽度为5红色的实体铅笔
	CPen pen(PS_SOLID,5,RGB(255,0,0));
	//选用铅笔
	CPen *oldPen = pDC->SelectObject(&pen);
	pDC->MoveTo(x,y);
	
	//将所有内部数据绘制
	for (int i=0; i<=4; i++)
	{
		newX = i*50+x+100;
		newY = y-pDoc->m_DataArray[i]*10;
		//绘制曲线峰点
		pDC->LineTo(newX,newY);
	}
	//旧铅笔现场恢复
	pDC->SelectObject(oldPen);
*/}

/////////////////////////////////////////////////////////////////////////////
// CPointView diagnostics

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

void CPointView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CPointView message handlers