| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 598 人关注过本帖
标题:visual studio 2005 与vc++ 6.0 编写程序以及设置有哪些不同呢?
只看楼主 加入收藏
lgq_lxm
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-10-13
收藏
 问题点数:0 回复次数:0 
visual studio 2005 与vc++ 6.0 编写程序以及设置有哪些不同呢?
我仿照vc++的书上的例子画一个圆,很简单,添加的程序如下红色字体:
void CLiuView::OnDraw(CDC* pDC)
{
pDC->TextOut(0,0,"hello");
pDC->SelectStockObject(GRAY_BRUSH);
pDC->Ellipse(CRect(0,20,100,120));

}

但是在visual studio 2005中加入上述代码就构建不了,总是出现如下错误:

.\LXMView.cpp(50) : error C2065: 'pDC' : undeclared identifier
.\LXMView.cpp(50) : error C2227: left of '->TextOutW' must point to class/struct/union/generic type
type is ''unknown-type''
.\LXMView.cpp(51) : error C2227: left of '->SelectStockObject' must point to class/struct/union/generic type
type is ''unknown-type''
.\LXMView.cpp(52) : error C2227: left of '->Ellipse' must point to class/struct/union/generic type
type is ''unknown-type''
Generating Code...
请问各位高手这是什么原因在啊?
搜索更多相关主题的帖子: pDC visual studio cpp 
2007-10-13 17:28
快速回复:visual studio 2005 与vc++ 6.0 编写程序以及设置有哪些不同呢?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021436 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved