用VC++6.0写的绘画程序,画出椭圆为什么会这样子
ove(UINTvoidCYang_JieView::OnMouseMnFlags,CPointpoint){//TODO:Addyourmessagehandlerco...
ove(UINT void CYang_JieView::OnMouseMnFlags, CPoint point){ // TODO: Add your message handler code here and/or call default if(m_dragging)
{
CClientDC dc(this);dc.SetROP2(R2_NOT);
CBrush brush;brush.CreateSolidBrush(m_color);CBrush* pOldBrush = dc.SelectObject(&brush);dc.SelectObject(pOldBrush);
switch(m_shape) { case 3: //dc.SelectObject(brush); CRgn rgn; rgn.CreateEllipticRgn(m_pointorg.x,m_pointorg.y,point.x,point.y); dc.Ellipse(m_pointorg.x,m_pointorg.y,m_pointold.x,m_pointold.y); dc.Ellipse(m_pointorg.x,m_pointorg.y,point.x,point.y); dc.FillRgn(&rgn,&brush); } m_pointold=point; //dc.SelectObject(oldPen); dc.SelectObject(pOldBrush); } CView::OnMouseMove(nFlags, point);} 展开
{
CClientDC dc(this);dc.SetROP2(R2_NOT);
CBrush brush;brush.CreateSolidBrush(m_color);CBrush* pOldBrush = dc.SelectObject(&brush);dc.SelectObject(pOldBrush);
switch(m_shape) { case 3: //dc.SelectObject(brush); CRgn rgn; rgn.CreateEllipticRgn(m_pointorg.x,m_pointorg.y,point.x,point.y); dc.Ellipse(m_pointorg.x,m_pointorg.y,m_pointold.x,m_pointold.y); dc.Ellipse(m_pointorg.x,m_pointorg.y,point.x,point.y); dc.FillRgn(&rgn,&brush); } m_pointold=point; //dc.SelectObject(oldPen); dc.SelectObject(pOldBrush); } CView::OnMouseMove(nFlags, point);} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询