帮忙看看:小弟我这个程序为什么画不出Bezier曲线呀,没异常,算法也对的呀

帮忙看看:我这个程序为什么画不出Bezier曲线呀,没错误,算法也对的呀
[code=C/C++][/code]// BEIZER_MFCView.cpp : implementation of the CBEIZER_MFCView class
//

#include "stdafx.h"
#include "BEIZER_MFC.h"

#include "BEIZER_MFCDoc.h"
#include "BEIZER_MFCView.h"

#include "math.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView

IMPLEMENT_DYNCREATE(CBEIZER_MFCView, CView)

BEGIN_MESSAGE_MAP(CBEIZER_MFCView, CView)
//{{AFX_MSG_MAP(CBEIZER_MFCView)
ON_COMMAND(ID_BEIZER_MOVE, OnBeizerMove)
ON_COMMAND(ID_BEIZER_ADD, OnBeizerAdd)
ON_COMMAND(ID_BEIZER_CLEAR, OnBeizerClear)
ON_WM_RBUTTONUP()
ON_WM_RBUTTONDOWN()
ON_WM_MOUSEMOVE()
ON_WM_LBUTTONUP()
ON_WM_LBUTTONDOWN()
ON_UPDATE_COMMAND_UI(ID_BEIZER_ADD, OnUpdateBeizerAdd)
ON_UPDATE_COMMAND_UI(ID_BEIZER_MOVE, OnUpdateBeizerMove)
ON_WM_PAINT()
//}}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()

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView construction/destruction

CBEIZER_MFCView::CBEIZER_MFCView()
{
// TODO: add construction code here
WHAT_TO_DO=-1;
n = -1;
current2 = -1;
current = -1;
AddorMove =1;
COLOR = RGB(0,0,255);
p1[0].x=0;
p1[0].y=0;
p1[1].x=0;
p1[1].y=0;
p2[0].x=0;
p2[0].y=0;
p2[1].x=0;
p2[1].y=0;
n=-1;

}

CBEIZER_MFCView::~CBEIZER_MFCView()
{
}

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

return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView drawing

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

//CDC *cdc=GetDC ();
//cdc->TextOut (10, 20, "PS:鼠标左键添加曲线,鼠标右键修改曲线.");





}

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CBEIZER_MFCView message handlers

void CBEIZER_MFCView::OnLButtonUp(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);