2013-10-20
展开全部
void CMFCDrawingView::OnDraw(CDC* pDC)
{
CMFCDrawingDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
DrawGraphics(pDC);
// TODO: 在此处为本机数据添加绘制代码
}
void CMFCDrawingView::DrawGraphics(CDC * pDC)
{
//定义画笔
CPen oPen(PS_SOLID, 1, RGB(255,0,0));
CPen * pOldPen = pDC->SelectObject(&oPen);
POINT aPoint[6] = {{10,10},{20,20},{40,50},{50,40},{30,20},{10,10}};
pDC->Polygon(aPoint, 6);
pDC->Ellipse(100,100,210,210);
pDC->Pie(200,200, 250, 250, 200,200, 225,225);
pDC->SelectObject(pOldPen);
}
{
CMFCDrawingDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
DrawGraphics(pDC);
// TODO: 在此处为本机数据添加绘制代码
}
void CMFCDrawingView::DrawGraphics(CDC * pDC)
{
//定义画笔
CPen oPen(PS_SOLID, 1, RGB(255,0,0));
CPen * pOldPen = pDC->SelectObject(&oPen);
POINT aPoint[6] = {{10,10},{20,20},{40,50},{50,40},{30,20},{10,10}};
pDC->Polygon(aPoint, 6);
pDC->Ellipse(100,100,210,210);
pDC->Pie(200,200, 250, 250, 200,200, 225,225);
pDC->SelectObject(pOldPen);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询