毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> net技术 >> 正文

不能将参数 1 从“Point”转换为“POINT”

更新时间:2012-6-15:  来源:毕业论文

一个问题求助,关于MoveTo()和LineTo()的;怎么解决;;;大虾门帮一下忙;严重感谢
void CHermiteView::OnLButtonUp(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
int i;
if(m_nCount==0)
{
CClientDC dc(this);
CPen pen,*oldpen;
pen.CreatePen(PS_SOLID,5,RGB(255,180,0));
oldpen=dc.SelectObject(&pen);
hermite_to_points(ptControlPts,ptPts,npoints);

dc.MoveTo(ptPts[0]);
//dc.MoveTo(ptPts[npoints+1].x,ptPts[npoints+1].y);
for (i=1;i<npoints;i++)
{
dc.LineTo(ptPts[i]);
}
dc.SelectObject(oldpen);
}

CView::OnRButtonUp(nFlags, point);
}

void CHermiteView::OnMouseMove(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
if (m_nCount>0 && m_nCount<=N && m_nCount%2==1)
{
CClientDC dc(this);
dc.SetROP2(R2_NOT);
dc.MoveTo((CPoint)ptControlPts[m_nCount-1]);
dc.LineTo(m_Newpoint);
dc.MoveTo((CPoint)ptControlPts[m_nCount-1]);
dc.LineTo(point);
m_Newpoint=point;
}

CView::OnMouseMove(nFlags, point);
}:\Hermite\HermiteView.cpp(168) : error C2664: “CPoint CDC::MoveTo(POINT)” : 不能将参数 1 从“Point”转换为“POINT”
  无构造函数可以接受源类型,或构造函数重载决策不明确
f:\Hermite\HermiteView.cpp(172) : error C2664: “BOOL CDC::LineTo(POINT)” : 不能将参数 1 从“Point”转换为“POINT”
  无构造函数可以接受源类型,或构造函数重载决策不明确
f:\Hermite\HermiteView.cpp(187) : error C2440: “类型转换” : 无法从“Point”转换为“CPoint”
  无构造函数可以接受源类型,或构造函数重载决策不明确
f:\Hermite\HermiteView.cpp(189) : error C2440: “类型转换” : 无法从“Point”转换为“CPoint”
  无构造函数可以接受源类型,或构造函数重载决策不明确

自己转换咯,如下,没试过
POINT p=new POINT()
p.x=ptPts[0].x
p.y=ptPts[0].y
可以用继承来实现

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。