代码输入之后
Ex09_1View.cpp
D:\Program Files\Microsoft Visual Studio\MyProjects\Ex09_1\Ex09_1View.cpp(61) : error C2039: 'TextOutA' : is not a member of 'CEx09_1Doc'
d:\program files\microsoft visual studio\myprojects\ex09_1\ex09_1doc.h(14) : see declaration of 'CEx09_1Doc'
D:\Program Files\Microsoft Visual Studio\MyProjects\Ex09_1\Ex09_1View.cpp(62) : error C2039: 'Rectangle' : is not a member of 'CEx09_1Doc'
d:\program files\microsoft visual studio\myprojects\ex09_1\ex09_1doc.h(14) : see declaration of 'CEx09_1Doc'
Generating Code...
Compiling...
Ex09_1.cpp
Generating Code...
Compiling...
Ex09_1Doc.cpp
Generating Code...
执行 cl.exe 时出错.
Ex09_1.exe - 1 error(s), 0 warning(s)
这是为什么呢?
void CEx09_1View::OnDraw(CDC* pDC)
{
CEx09_1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->TextOut(100,10,"MFC打印功能实现"); //输出一行文字
pDC->Rectangle(30,100,330,400); //绘制一个矩形
}