对话框上全图显示图像

时间:2014-07-13 16:40:26
【文件属性】:
文件名称:对话框上全图显示图像
文件大小:4.83MB
文件格式:RAR
更新时间:2014-07-13 16:40:26
对话框上全图显示图像 结合网上的代码,找到了两种全图显示的办法。 第一种是使用GDI+,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiPlusImgCtrl。重载DrawItem函数来实现绘制图像 可能你觉得使用GDI+麻烦,需要对GDI+环境进行初始化,打包程序又得附带gdiplus.dll。那么我介绍的第二种方法使用GDI就没这么麻烦了。 第一种是使用GDI,同样需要使用到picture control,不过这次需要设置属性->杂项->type,选择Owner Draw类型。然后从CStatic类中派生出一个新类:CGdiImgCtrl。重载DrawItem函数来实现绘制图像
【文件预览】:
DrawImgOnDlg
----DrawImgOnDlg()
--------DrawImgOnDlg.h(547B)
--------DrawImgOnDlg.cpp(2KB)
--------resource.h(1KB)
--------GdiPlusImgCtrl.cpp(2KB)
--------DrawImgOnDlg.vcproj.CLEVER101.Administrator.user(1KB)
--------stdafx.h(3KB)
--------DrawImgOnDlg.vcproj(6KB)
--------GdiImgCtrl.cpp(1KB)
--------GdiImgCtrl.h(372B)
--------GdiPlusImgCtrl.h(534B)
--------DrawImgOnDlg.aps(5.03MB)
--------DrawImgOnDlgDlg.cpp(5KB)
--------stdafx.cpp(143B)
--------ReadMe.txt(3KB)
--------DrawImgOnDlg.rc(6KB)
--------res()
--------DrawImgOnDlgDlg.h(959B)
----Questions.suo(16KB)
----Questions.sln(1KB)

网友评论