www.pudn.com > 61180784220051224913292402087.rar > cantoView.cpp
// cantoView.cpp : implementation of the CCantoView class
//
#include "stdafx.h"
#include "canto.h"
#include "cantoDoc.h"
#include "cantoView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCantoView
IMPLEMENT_DYNCREATE(CCantoView, CView)
BEGIN_MESSAGE_MAP(CCantoView, CView)
//{{AFX_MSG_MAP(CCantoView)
// 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
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCantoView construction/destruction
CCantoView::CCantoView()
{
// TODO: add construction code here
}
CCantoView::~CCantoView()
{
}
BOOL CCantoView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CCantoView drawing
void CCantoView::OnDraw(CDC* pDC)
{
CCantoDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
AfxGetMainWnd()->SetWindowText("cantor三分集(分形频道:fractal.cn)2004");
canto(50,100,750,100);
}
/////////////////////////////////////////////////////////////////////////////
// CCantoView diagnostics
#ifdef _DEBUG
void CCantoView::AssertValid() const
{
CView::AssertValid();
}
void CCantoView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CCantoDoc* CCantoView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCantoDoc)));
return (CCantoDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCantoView message handlers
void CCantoView::canto(int ax, int ay, int bx, int by)
{
CClientDC pDC(this);
int c=10;
if((bx-ax)