资源简介
详细展示如何在VC对话框中使用picture control显示图片,并带有滚动条完美控制。
并详细展示在单文档中显示图片,并带有滚动条完美控制。
可以处理的图片格式:bmp,jpg,png,gif
非常经典,请大家下载后收藏。

代码片段和文件信息
// Graphics.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Graphics.h“
#include “MainFrm.h“
#include “GraphicsDoc.h“
#include “GraphicsView.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGraphicsApp
BEGIN_MESSAGE_MAP(CGraphicsApp CWinApp)
//{{AFX_MSG_MAP(CGraphicsApp)
ON_COMMAND(ID_APP_ABOUT OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGraphicsApp construction
CGraphicsApp::CGraphicsApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CGraphicsApp object
CGraphicsApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CGraphicsApp initialization
BOOL CGraphicsApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
LoadStdProfileSettings(8); // Load standard INI file options (including MRU)
// Register the application‘s document templates. Document templates
// serve as the connection between documents frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CGraphicsDoc)
RUNTIME_CLASS(CMainframe) // main SDI frame window
RUNTIME_CLASS(CGraphicsView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands DDE file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->U
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 131172 2011-11-19 12:59 VC显示图片(带滚动条控制)\Graphics\Debug\Graphics.exe
文件 47180 2000-12-02 22:20 VC显示图片(带滚动条控制)\Graphics\Graphics.aps
文件 2478 2000-12-10 23:31 VC显示图片(带滚动条控制)\Graphics\Graphics.clw
文件 4246 2000-06-22 11:14 VC显示图片(带滚动条控制)\Graphics\Graphics.cpp
文件 4594 2000-06-21 16:22 VC显示图片(带滚动条控制)\Graphics\Graphics.dsp
文件 541 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\Graphics.dsw
文件 1378 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\Graphics.h
文件 91136 2011-11-19 13:01 VC显示图片(带滚动条控制)\Graphics\Graphics.ncb
文件 50688 2011-11-19 13:01 VC显示图片(带滚动条控制)\Graphics\Graphics.opt
文件 2120 2011-11-19 12:59 VC显示图片(带滚动条控制)\Graphics\Graphics.plg
文件 13113 2000-12-02 22:20 VC显示图片(带滚动条控制)\Graphics\Graphics.rc
文件 4230 2000-07-26 05:38 VC显示图片(带滚动条控制)\Graphics\GraphicsDoc.cpp
文件 1517 2000-06-19 02:22 VC显示图片(带滚动条控制)\Graphics\GraphicsDoc.h
文件 12239 2000-12-03 16:22 VC显示图片(带滚动条控制)\Graphics\GraphicsView.cpp
文件 2201 2000-11-03 13:42 VC显示图片(带滚动条控制)\Graphics\GraphicsView.h
文件 2540 2000-06-19 02:57 VC显示图片(带滚动条控制)\Graphics\MainFrm.cpp
文件 1581 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\MainFrm.h
文件 4359 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\ReadMe.txt
文件 1078 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\res\Graphics.ico
文件 400 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\res\Graphics.rc2
文件 1078 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\res\GraphicsDoc.ico
文件 1078 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\res\Toolbar.bmp
文件 783 2000-11-03 13:44 VC显示图片(带滚动条控制)\Graphics\resource.h
文件 210 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\StdAfx.cpp
文件 1054 2000-06-18 21:13 VC显示图片(带滚动条控制)\Graphics\StdAfx.h
文件 308 2011-11-19 13:07 VC显示图片(带滚动条控制)\www.viewtop8.com.txt
目录 0 2011-11-19 13:01 VC显示图片(带滚动条控制)\Graphics\Debug
目录 0 2005-03-24 11:53 VC显示图片(带滚动条控制)\Graphics\res
目录 0 2011-11-19 13:01 VC显示图片(带滚动条控制)\Graphics
目录 0 2011-11-19 13:07 VC显示图片(带滚动条控制)
............此处省略3个文件信息
相关资源
- Windows异步套接字网络编程
- VC 获得文件属性 获取文件的创建时
- 基于MVC模式的会员管理系统
- silicon lab公司的收音IC SI47XX全套开发工
- 读者写者问题(读者优先,写者优先
- MFC程序-碰撞的小球
- vc 柱形图 CBarChart
- 用vc 写的导线测量,针对刚学测绘的
- 用VC 编写的仿QQ聊天室程序源代码
- 栅栏填充算法源码(VC)
- GDI自绘滚动条
- 简单的房屋租赁系统
- .net网站服装销售系统(MVC)
-
ob
jectARX给Auto CAD加工具条 - blowfish的vc2008工程.rar
- 画图程序MFC/VC/VC CRectTracker 串行化
- capon波束形成算法-VC实现
- 读取串口数据并画实时曲线的VC 程序
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- keil vcom windows 7 64bit 驱动
- vc URL编解码类
- vc编写中国象棋详细源码注释并附有视
- VC 围棋源代码
- 用VC 编写的基于SNMP的路由器拓扑程序
- vc利用MFC底层开发的二维GIS管理软件,
- 兰勃托地图投影VC源码
评论
共有 条评论