F:\练习\EX04C\EX04CView.cpp(213) : error C2065: 'OnprepareDC' : undeclared identifier
F:\练习\EX04C\EX04CView.cpp(215) : error C2039: 'CPtoDP' : is not a member of 'CClientDC'
f:\vc++安装程序\mfc\include\afxwin.h(1035) : see declaration of 'CClientDC'
执行 cl.exe 时出错.
这些是我编写程序时出现的错误,请问大家怎样解决啊?
出错的地方如下:
void CEX04CView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
OnprepareDC(&dc);
CRect rectDevice=m_rectEllipse;
dc.CPtoDP(rectDevice);
if(rectDevice.PtInRect(point))
{
if(m_nColor==GRAY_BRUSH)
{
m_nColor=WHITE_BRUSH;
}
else
{
m_nColor=GRAY_BRUSH;
}
InvalidateRect(m_rectEllipse);
}
// CScrollView::OnLButtonDown(nFlags, point);
}
class CClientDC : public CDC
{
DECLARE_DYNAMIC(CClientDC)
// Constructors
public:
CClientDC(CWnd* pWnd);
// Attributes
。。。。。。。。