【求助】关于MFC动态贴图
单击鼠标使图片移动,编译时出错,提示:
--------------------Configuration: 贴图且移动 - Win32 Debug--------------------
Compiling...
贴图且移动View.cpp
F:\与学习有关的文档\贴图且移动\贴图且移动View.cpp(117) : error C2065: 'rect' : undeclared identifier
F:\与学习有关的文档\贴图且移动\贴图且移动View.cpp(119) : error C2039: 'DelectDC' : is not a member of 'CDC'
f:\软件安装\mfc\include\afxwin.h(636) : see declaration of 'CDC'
执行 cl.exe 时出错.
贴图且移动View.obj - 1 error(s), 0 warning(s)
函数如下:
void CMyView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CDC *pdc=GetDC();
CRect r;
GetClientRect(&r);
ktPeople.SelectObject(m_ktPeople);
pdc->Rectangle(rect);
pdc->BitBlt (point.x,point.y,256,256,&ktPeople,0,0,SRCCOPY);
pdc->DelectDC ();
CView::OnLButtonDown(nFlags, point);
}