首页上一页 1 下一页尾页 8 条记录 1/1页
关于《从入门到精通visual c++》第一章最后一小结 创建简单的MFC问题
发表在C语言图书答疑
2009-08-14
是否精华
是
否
版块置顶:
是
否
设置时间:
非永久
永久
起始时间:
结束时间:
是否扣分:
是
否
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
helloDlg.cpp
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\hello\helloDlg.cpp(177) : error C2146: syntax error : missing ';' before identifier 'GetDlgtem'
D:\hello\helloDlg.cpp(177) : error C2065: 'GetDlgtem' : undeclared identifier
D:\hello\helloDlg.cpp(177) : error C2227: left of '->SetWindowTextA' must point to class/struct/union
D:\hello\helloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
Error executing cl.exe.
hello.exe - 6 error(s), 0 warning(s)
不知道哪出错了老是成功不了! 敬请告之!
一个刚学习C++语言的菜鸟!
Compiling...
helloDlg.cpp
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\hello\helloDlg.cpp(177) : error C2146: syntax error : missing ';' before identifier 'GetDlgtem'
D:\hello\helloDlg.cpp(177) : error C2065: 'GetDlgtem' : undeclared identifier
D:\hello\helloDlg.cpp(177) : error C2227: left of '->SetWindowTextA' must point to class/struct/union
D:\hello\helloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
Error executing cl.exe.
hello.exe - 6 error(s), 0 warning(s)
不知道哪出错了老是成功不了! 敬请告之!
一个刚学习C++语言的菜鸟!
精彩评论 8
2009-08-15
4L
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
我看不到你写的代码,也说不上来,要不你把你的源程序发到我们QQ上我给你看看吧
[/FIELDSET]
回复:
您好老师:
void CHelloDlg::OnOK()
{
// TODO: Add extra validation here
CFont font;
font.CreatePointFont(200,"宋体");
GetDlgltem(IDC_STATIC)->SetWinDoeText("hello visual c++");
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
--------------------Configuration: Hello - Win32 Debug--------------------
Compiling...
HelloDlg.cpp
D:\vc\Hello\HelloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\vc\Hello\HelloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\vc\Hello\HelloDlg.cpp(177) : error C2146: syntax error : missing ';' before identifier 'GetDlgltem'
D:\vc\Hello\HelloDlg.cpp(177) : error C2065: 'GetDlgltem' : undeclared identifier
D:\vc\Hello\HelloDlg.cpp(177) : error C2227: left of '->SetWinDoeText' must point to class/struct/union
D:\vc\Hello\HelloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
再次麻烦你给看看!谢谢
我看不到你写的代码,也说不上来,要不你把你的源程序发到我们QQ上我给你看看吧
[/FIELDSET]
回复:
您好老师:
void CHelloDlg::OnOK()
{
// TODO: Add extra validation here
CFont font;
font.CreatePointFont(200,"宋体");
GetDlgltem(IDC_STATIC)->SetWinDoeText("hello visual c++");
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
--------------------Configuration: Hello - Win32 Debug--------------------
Compiling...
HelloDlg.cpp
D:\vc\Hello\HelloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\vc\Hello\HelloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\vc\Hello\HelloDlg.cpp(177) : error C2146: syntax error : missing ';' before identifier 'GetDlgltem'
D:\vc\Hello\HelloDlg.cpp(177) : error C2065: 'GetDlgltem' : undeclared identifier
D:\vc\Hello\HelloDlg.cpp(177) : error C2227: left of '->SetWinDoeText' must point to class/struct/union
D:\vc\Hello\HelloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
再次麻烦你给看看!谢谢
2009-08-21
8L
[FIELDSET][LEGEND]引自:5楼[/LEGEND]
明显font.CreatePointFont(200,"宋体");分号有问题
[/FIELDSET]
回复:
void CHelloDlg::OnOK()
{
// TODO: Add extra validation here
CFont font;
font.CreatePointFont(200,“宋体”);
GetDlgltem(IDC_STATIC)->SetWinDowTexe(“HELLO Visual c++”);
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
helloDlg.cpp
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xb0'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xcb'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xce'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xcc'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xe5'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xb1'
D:\hello\helloDlg.cpp(176) : error C2059: syntax error : ')'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xb0'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xb1'
D:\hello\helloDlg.cpp(178) : error C2065: 'GetDlgltem' : undeclared identifier
D:\hello\helloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
Error executing cl.exe.
hello.exe - 17 error(s), 0 warning(s)
老师我还是出现这样的错误! 希望老师帮忙做一下深入的分析! 万分的感谢!
明显font.CreatePointFont(200,"宋体");分号有问题
[/FIELDSET]
回复:
void CHelloDlg::OnOK()
{
// TODO: Add extra validation here
CFont font;
font.CreatePointFont(200,“宋体”);
GetDlgltem(IDC_STATIC)->SetWinDowTexe(“HELLO Visual c++”);
GetDlgltem(IDC_STATIC)->SetFont(&font);
//CDialog::OnOK();
}
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
helloDlg.cpp
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xb0'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xcb'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xce'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xcc'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xe5'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xb1'
D:\hello\helloDlg.cpp(176) : error C2059: syntax error : ')'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xa3'
D:\hello\helloDlg.cpp(176) : error C2018: unknown character '0xbb'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xb0'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xa1'
D:\hello\helloDlg.cpp(177) : error C2018: unknown character '0xb1'
D:\hello\helloDlg.cpp(178) : error C2065: 'GetDlgltem' : undeclared identifier
D:\hello\helloDlg.cpp(178) : error C2227: left of '->SetFont' must point to class/struct/union
Error executing cl.exe.
hello.exe - 17 error(s), 0 warning(s)
老师我还是出现这样的错误! 希望老师帮忙做一下深入的分析! 万分的感谢!