关于LineTo函数的报错,该怎么处理
关于LineTo函数的报错
我是初学者,在把书上一个鼠标输入的示例程序后,经过几次编译,最后还有这样一个问题:F:\MYPROJECTS\mouse2\mouse2View.cpp(68) : error C2039: 'LineTO ' : is not a member of 'CDC '
d:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(636) : see declaration of 'CDC '
该部分程序如下:
void CMouse2View::OnDraw(CDC* pDC)
{
// CMouse2Doc* pDoc = GetDocument();
// ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CRect rect;
GetClientRect(rect);
pDC-> MoveTo(rect.left,m_prePoint.y);
pDC-> LineTO(rect.right,m_prePoint.y);
pDC-> MoveTo(m_prePoint.x,rect.top);
pDC-> LineTo(m_prePoint.x,rect.bottom);
}
我查看了afxwin.h中LineTo但定义,对照看,看不出哪里错了。
请教一下怎样解决这个问题,谢谢^_^
------解决方案--------------------
LineTO 写成LineTo
我是初学者,在把书上一个鼠标输入的示例程序后,经过几次编译,最后还有这样一个问题:F:\MYPROJECTS\mouse2\mouse2View.cpp(68) : error C2039: 'LineTO ' : is not a member of 'CDC '
d:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(636) : see declaration of 'CDC '
该部分程序如下:
void CMouse2View::OnDraw(CDC* pDC)
{
// CMouse2Doc* pDoc = GetDocument();
// ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CRect rect;
GetClientRect(rect);
pDC-> MoveTo(rect.left,m_prePoint.y);
pDC-> LineTO(rect.right,m_prePoint.y);
pDC-> MoveTo(m_prePoint.x,rect.top);
pDC-> LineTo(m_prePoint.x,rect.bottom);
}
我查看了afxwin.h中LineTo但定义,对照看,看不出哪里错了。
请教一下怎样解决这个问题,谢谢^_^
------解决方案--------------------
LineTO 写成LineTo