| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1077 人关注过本帖
标题:位图在VIEW中的加载问题
只看楼主 加入收藏
guer168
Rank: 2
等 级:论坛游民
帖 子:46
专家分:37
注 册:2010-3-19
结帖率:75%
收藏
 问题点数:0 回复次数:1 
位图在VIEW中的加载问题
程序代码:
BOOL CMy11_30_1View::OnEraseBkgnd(CDC* pDC)
{
    // TODO: Add your message handler code here and/or call default
    CBitmap bitmap;
    bitmap.LoadBitmap(IDB_BITMAP1);
    CDC dcCompatible;
    dcCompatible.CreateCompatibleDC(pDC);
    dcCompatible.SelectObject(&bitmap)
    CRect rect;
    GetClientRect(&rect);
    pDC->BitBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,0,0,SRCCOPY);
    return TRUE;
   
}
里为什么会出来现rect没有定义呢!?
e:\program files\vc98\mfc\include\afxwin.h(225) : see declaration of 'CRect'
G:\VC\11_30_1\11_30_1View.cpp(236) : error C2065: 'rect' : undeclared identifier
G:\VC\11_30_1\11_30_1View.cpp(238) : error C2228: left of '.Width' must have class/struct/union type
G:\VC\11_30_1\11_30_1View.cpp(238) : error C2228: left of '.Height' must have class/struct/union type
执行 cl.exe 时出错.

11_30_1.exe - 1 error(s), 0 warning(s)
搜索更多相关主题的帖子: 位图 VIEW 加载 
2010-12-06 22:43
guer168
Rank: 2
等 级:论坛游民
帖 子:46
专家分:37
注 册:2010-3-19
收藏
得分:0 
呵呵我自已发现了问题了………………嘻嘻
dcCompatible.SelectObject(&bitmap)
原来是这里少了一个分号咧

淘宝:http://guer168.  百度有啊http://youa.baidu.com/shop/75fb2a3584ed3e7d5e1e752d?from=hi
2010-12-06 23:13
快速回复:位图在VIEW中的加载问题
数据加载中...
 
   



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

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