文件名称:DrawImgOnDlg
- 所属分类:
- GDI/图象编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 4.83mb
- 下载次数:
- 0次
- 提 供 者:
- 朱**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
结合网上的代码,找到了两种全图显示的办法。
第一种是使用GDI+,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiPlusImgCtrl。重载DrawItem函数来实现绘制图像
可能你觉得使用GDI+麻烦,需要对GDI+环境进行初始化,打包程序又得附带gdiplus.dll。那么我介绍的第二种方法使用GDI就没这么麻烦了。
第一种是使用GDI,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiImgCtrl。重载DrawItem函数来实现绘制图像
-Combined with the online code, found two ways to display the whole map. The first is to use GDI+, the same need to use the picture control, but the need to set properties-> Miscellaneous-> type, select the Owner Draw type. Then derived from CStatic class in a new class: CGdiPlusImgCtrl. DrawItem function overloading to achieve the image you may feel drawn to use GDI+ trouble, need to initialize GDI+ environment, the program is again packed with gdiplus.dll. Then I use the second method described GDI no such trouble. The first is to use the GDI, the same need to use the picture control, but the need to set properties-> Miscellaneous-> type, select the Owner Draw type. Then derived from CStatic class in a new class: CGdiImgCtrl. Overloaded function to achieve the draw images DrawItem
第一种是使用GDI+,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiPlusImgCtrl。重载DrawItem函数来实现绘制图像
可能你觉得使用GDI+麻烦,需要对GDI+环境进行初始化,打包程序又得附带gdiplus.dll。那么我介绍的第二种方法使用GDI就没这么麻烦了。
第一种是使用GDI,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiImgCtrl。重载DrawItem函数来实现绘制图像
-Combined with the online code, found two ways to display the whole map. The first is to use GDI+, the same need to use the picture control, but the need to set properties-> Miscellaneous-> type, select the Owner Draw type. Then derived from CStatic class in a new class: CGdiPlusImgCtrl. DrawItem function overloading to achieve the image you may feel drawn to use GDI+ trouble, need to initialize GDI+ environment, the program is again packed with gdiplus.dll. Then I use the second method described GDI no such trouble. The first is to use the GDI, the same need to use the picture control, but the need to set properties-> Miscellaneous-> type, select the Owner Draw type. Then derived from CStatic class in a new class: CGdiImgCtrl. Overloaded function to achieve the draw images DrawItem
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.aps
............\............\DrawImgOnDlg.cpp
............\............\DrawImgOnDlg.h
............\............\DrawImgOnDlg.rc
............\............\DrawImgOnDlg.vcproj
............\............\DrawImgOnDlg.vcproj.CLEVER101.Administrator.user
............\............\DrawImgOnDlgDlg.cpp
............\............\DrawImgOnDlgDlg.h
............\............\GdiImgCtrl.cpp
............\............\GdiImgCtrl.h
............\............\GdiPlusImgCtrl.cpp
............\............\GdiPlusImgCtrl.h
............\............\ReadMe.txt
............\............\res\DrawImgOnDlg.ico
............\............\...\DrawImgOnDlg.rc2
............\............\...\好i.bmp
............\............\...\花蕊.bmp
............\............\resource.h
............\............\stdafx.cpp
............\............\stdafx.h
............\Questions.sln
............\Questions.suo
............\DrawImgOnDlg\res
............\DrawImgOnDlg
DrawImgOnDlg
............\............\DrawImgOnDlg.cpp
............\............\DrawImgOnDlg.h
............\............\DrawImgOnDlg.rc
............\............\DrawImgOnDlg.vcproj
............\............\DrawImgOnDlg.vcproj.CLEVER101.Administrator.user
............\............\DrawImgOnDlgDlg.cpp
............\............\DrawImgOnDlgDlg.h
............\............\GdiImgCtrl.cpp
............\............\GdiImgCtrl.h
............\............\GdiPlusImgCtrl.cpp
............\............\GdiPlusImgCtrl.h
............\............\ReadMe.txt
............\............\res\DrawImgOnDlg.ico
............\............\...\DrawImgOnDlg.rc2
............\............\...\好i.bmp
............\............\...\花蕊.bmp
............\............\resource.h
............\............\stdafx.cpp
............\............\stdafx.h
............\Questions.sln
............\Questions.suo
............\DrawImgOnDlg\res
............\DrawImgOnDlg
DrawImgOnDlg