DrawImgOnDlg

所属分类:GDI/图象编程
开发工具:Visual C++
文件大小:4949KB
下载次数:31
上传日期:2011-06-23 22:57:51
上 传 者explorer101
说明:   结合网上的代码,找到了两种全图显示的办法。 第一种是使用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 (5273556, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.cpp (1971, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.h (547, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.rc (5705, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.vcproj (5918, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlg.vcproj.CLEVER101.Administrator.user (1415, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlgDlg.cpp (5443, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\DrawImgOnDlgDlg.h (959, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\GdiImgCtrl.cpp (1419, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\GdiImgCtrl.h (372, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\GdiPlusImgCtrl.cpp (1943, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\GdiPlusImgCtrl.h (534, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\res\DrawImgOnDlg.ico (21630, 2005-11-11)
DrawImgOnDlg\DrawImgOnDlg\res\DrawImgOnDlg.rc2 (368, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\res\好i.bmp (3402710, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\res\花蕊.bmp (1811750, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\resource.h (1049, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\stdafx.cpp (143, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\stdafx.h (2564, 2011-06-23)
DrawImgOnDlg\Questions.sln (1051, 2011-06-23)
DrawImgOnDlg\Questions.suo (15872, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg\res (0, 2011-06-23)
DrawImgOnDlg\DrawImgOnDlg (0, 2011-06-23)
DrawImgOnDlg (0, 2011-06-23)

================================================================================ MICROSOFT 基础类库: DrawImgOnDlg 项目概述 =============================================================================== 应用程序向导已为您创建了这个 DrawImgOnDlg 应用程序。此应用程序不仅演示 Microsoft 基础类的基本使用方法,还可作为您编写应用程序的起点。 本文件概要介绍组成 DrawImgOnDlg 应用程序的每个文件的内容。 DrawImgOnDlg.vcproj 这是使用应用程序向导生成的 VC++ 项目的主项目文件。 它包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 DrawImgOnDlg.h 这是应用程序的主要头文件。它包括其他项目特定的头文件(包括 Resource.h),并声明 CDrawImgOnDlgApp 应用程序类。 DrawImgOnDlg.cpp 这是包含应用程序类 CDrawImgOnDlgApp 的主要应用程序源文件。 DrawImgOnDlg.rc 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。项目资源位于 2052 中。 res\DrawImgOnDlg.ico 这是用作应用程序图标的图标文件。此图标包括在主要资源文件 DrawImgOnDlg.rc 中。 res\DrawImgOnDlg.rc2 此文件包含不在 Microsoft Visual C++ 中进行编辑的资源。您应该将不可由资源编辑器编辑的所有资源放在此文件中。 ///////////////////////////////////////////////////////////////////////////// 应用程序向导创建一个对话框类: DrawImgOnDlgDlg.h,DrawImgOnDlgDlg.cpp - 对话框 这些文件包含 CDrawImgOnDlgDlg 类。该类定义应用程序主对话框的行为。该对话框的模板位于 DrawImgOnDlg.rc 中,该文件可以在 Microsoft Visual C++ 中进行编辑。 ///////////////////////////////////////////////////////////////////////////// 其他功能: ActiveX 控件 应用程序包括对使用 ActiveX 控件的支持。 打印及打印预览支持 应用程序向导已通过从 MFC 库调用 CView 类中的成员函数,生成了用于处理打印、打印设置和打印预览命令的代码。 ///////////////////////////////////////////////////////////////////////////// 其他标准文件: StdAfx.h,StdAfx.cpp 这些文件用于生成名为 DrawImgOnDlg.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 Resource.h 这是标准头文件,它定义新的资源 ID。 Microsoft Visual C++ 读取并更新此文件。 DrawImgOnDlg.manifest 应用程序清单文件供 Windows XP 用来描述应用程序 对特定版本并行程序集的依赖性。加载程序使用此 信息从程序集缓存加载适当的程序集或 从应用程序加载私有信息。应用程序清单可能为了重新分发而作为 与应用程序可执行文件安装在相同文件夹中的外部 .manifest 文件包括, 也可能以资源的形式包括在该可执行文件中。 ///////////////////////////////////////////////////////////////////////////// 其他注释: 应用程序向导使用“TODO:”指示应添加或自定义的源代码部分。 如果应用程序在共享的 DLL 中使用 MFC,则需要重新发布这些 MFC DLL;如果应用程序所用的语言与操作系统的当前区域设置不同,则还需要重新发布对应的本地化资源 MFC80XXX.DLL。有关这两个主题的更多信息,请参见 MSDN 文档中有关 Redistributing Visual C++ applications (重新发布 Visual C++ 应用程序)的章节。 /////////////////////////////////////////////////////////////////////////////

近期下载者

相关文件


收藏者