VC++ Picture Control中显示jpg图片
来源:互联网 发布:mac远程桌面软件 编辑:程序博客网 时间:2024/05/07 01:59
通常使用CImage来显示图片,如jpg,png等图片,使用方法如下:
#include "atlimage.h" //使用CImage需要导入的头文件
CImage image; //image对象
CRect imageRect; //绘画image的区域对象
CString imagePath("res/5.JPG"); //图片路径 (绝对路径或相对路径),注意:路径不对Draw的时候会有异常的。
image.Load(imagePath); //根据路径load 图片
m_picture.GetClientRect(&imageRect); //获取Rect
CDC * pDc=m_picture.GetWindowDC(); //获得显示控件的DC
image.Draw(pDc->m_hDC,imageRect); //绘制图片到对应的区域
ReleaseDC(pDc); //释放DC
相关摘要:
http://www.techrss.cn/html/2008/11-22/176783.htm
http://hi.baidu.com/birdfly/blog/item/f18fb83e7e1dcefc828b13e3.html
- VC++ Picture Control中显示jpg图片
- VC++ Picture Control中显示jpg图片
- vc怎样在picture control中显示jpg,jif,bmp格式图象
- VC Picture Control显示BMP图片
- MFC用Picture control显示jpg等各种图片
- VC++图片控件(Picture Control)显示资源位图(BMP)、文件位图(BMP)、其它格式文件图片(JPG\PNG\BMP)的方法
- MFC在picture control中JPG/BMP/ICO等格式图片显示,并支持清除图片显示
- picture control中显示jpg,jif,bmp格式图象
- picture control中显示jpg,jif,bmp格式图象
- 在Picture Control控件上显示JPG图片并让图片适应控件的大小
- mfc- Picture control显示图片
- MFC Picture Control显示图片
- WTL Picture Control显示图片
- vc怎样在picture control中添加图片
- vc怎样在picture control中添加图片
- vc怎样在picture control中添加图片
- MFC中 利用OpenCv显示图片到Picture Control控件
- VC Picture Control 图片点击事件
- JAVA开发者最常去的20个英文网站
- 第三届CSDN英雄会上海站
- oracle中imp命令详解
- 嵌入式学习步骤---上海嵌入式(中嵌学院-)
- ASP连接sql2005数据库
- VC++ Picture Control中显示jpg图片
- FCKeditor 介绍
- 解决Ubuntu ssh VPN 登录慢问题
- 嵌入式中C和汇编的一些技巧---上海嵌入式(中嵌学院)
- JS与PHP通信时中文的处理
- struts2 图片问题, 这个是一个解决途径
- AIX下oracle的重新启动
- JQuery UI 关于拖拉商品到购物车构思的简单实现
- asp数据连接UPDATE