【求助】这段程序哪出错了
// asaView.cpp : implementation of the CAsaView class//
#include "stdafx.h"
#include "asa.h"
#include "asaDoc.h"
#include "asaView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAsaView
IMPLEMENT_DYNCREATE(CAsaView, CView)
BEGIN_MESSAGE_MAP(CAsaView, CView)
//{{AFX_MSG_MAP(CAsaView)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CAsaView construction/destruction
CAsaView::CAsaView()
{
// TODO: add construction code here
}
CAsaView::~CAsaView()
{
}
BOOL CAsaView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CAsaView drawing
void CAsaView::OnDraw(CDC* pDC)
{
CAsaDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
void CPolyView::OnDraw(CDC* pDC)
{
CPolyDoc* pDoc=GetDocument();
ASSERT_VALID(pDoc);
CRect RndRC(-54,38,49,0);
pDC->RoundRect(RndRC,CPoint(15,15));
}
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CAsaView printing
BOOL CAsaView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CAsaView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CAsaView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CAsaView diagnostics
#ifdef _DEBUG
void CAsaView::AssertValid() const
{
CView::AssertValid();
}
void CAsaView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CAsaDoc* CAsaView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAsaDoc)));
return (CAsaDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAsaView message handlers
显示问题如下:
--------------------Configuration: asa - Win32 Debug--------------------
Compiling...
asaView.cpp
E:\1\asa\asaView.cpp(61) : error C2653: 'CPolyView' : is not a class or namespace name
E:\1\asa\asaView.cpp(62) : error C2601: 'OnDraw' : local function definitions are illegal
执行 cl.exe 时出错.
asa.exe - 1 error(s), 0 warning(s)