首页上一页 1 下一页尾页 1 条记录 1/1页
求助
发表在C语言图书答疑
2010-04-17
是否精华
是
否
版块置顶:
是
否
.........
void CHello2Dlg::OnOK()
{CFont cfont;
cfont.CreatePointFont(200,"宋体");
GetDlgltem(IDC_STATIC)->SetWindowText("Hello Visual C++"); // TODO: Add extra validation here
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
这段程序是《Visual C++ 从入门到精通》上1.4.2编辑程序的例子 我按照上面的输进去却出现以下的错误请问是为什么 ?我是菜鸟,不懂为什么哦,哪位高手解答下啊
:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(182) : error C2065: 'GetDlgltem' : undeclared identifier
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(182) : error C2227: left of '->SetWindowTextA' must point to class/struct/union
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(183) : error C2227: left of '->SetFont' must point to class/struct/union
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(183) : error C2065: 'font' : undeclared identifier
Generating Code...
void CHello2Dlg::OnOK()
{CFont cfont;
cfont.CreatePointFont(200,"宋体");
GetDlgltem(IDC_STATIC)->SetWindowText("Hello Visual C++"); // TODO: Add extra validation here
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
这段程序是《Visual C++ 从入门到精通》上1.4.2编辑程序的例子 我按照上面的输进去却出现以下的错误请问是为什么 ?我是菜鸟,不懂为什么哦,哪位高手解答下啊
:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(182) : error C2065: 'GetDlgltem' : undeclared identifier
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(182) : error C2227: left of '->SetWindowTextA' must point to class/struct/union
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(183) : error C2227: left of '->SetFont' must point to class/struct/union
D:\Program Files\Microsoft Visual Studio\MyProjects\hello\hello2\hello2Dlg.cpp(183) : error C2065: 'font' : undeclared identifier
Generating Code...