資源簡(jiǎn)介
詳細(xì)展示如何在VC對(duì)話框中使用picture control顯示圖片,并帶有滾動(dòng)條完美控制。
并詳細(xì)展示在單文檔中顯示圖片,并帶有滾動(dòng)條完美控制。
可以處理的圖片格式:bmp,jpg,png,gif
非常經(jīng)典,請(qǐng)大家下載后收藏。

代碼片段和文件信息
//?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
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????131172??2011-11-19?12:59??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Debug\Graphics.exe
?????文件??????47180??2000-12-02?22:20??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.aps
?????文件???????2478??2000-12-10?23:31??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.clw
?????文件???????4246??2000-06-22?11:14??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.cpp
?????文件???????4594??2000-06-21?16:22??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.dsp
?????文件????????541??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.dsw
?????文件???????1378??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.h
?????文件??????91136??2011-11-19?13:01??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.ncb
?????文件??????50688??2011-11-19?13:01??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.opt
?????文件???????2120??2011-11-19?12:59??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.plg
?????文件??????13113??2000-12-02?22:20??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Graphics.rc
?????文件???????4230??2000-07-26?05:38??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\GraphicsDoc.cpp
?????文件???????1517??2000-06-19?02:22??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\GraphicsDoc.h
?????文件??????12239??2000-12-03?16:22??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\GraphicsView.cpp
?????文件???????2201??2000-11-03?13:42??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\GraphicsView.h
?????文件???????2540??2000-06-19?02:57??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\MainFrm.cpp
?????文件???????1581??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\MainFrm.h
?????文件???????4359??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\ReadMe.txt
?????文件???????1078??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\res\Graphics.ico
?????文件????????400??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\res\Graphics.rc2
?????文件???????1078??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\res\GraphicsDoc.ico
?????文件???????1078??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\res\Toolbar.bmp
?????文件????????783??2000-11-03?13:44??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\resource.h
?????文件????????210??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\StdAfx.cpp
?????文件???????1054??2000-06-18?21:13??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\StdAfx.h
?????文件????????308??2011-11-19?13:07??VC顯示圖片(帶滾動(dòng)條控制)\www.viewtop8.com.txt
?????目錄??????????0??2011-11-19?13:01??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\Debug
?????目錄??????????0??2005-03-24?11:53??VC顯示圖片(帶滾動(dòng)條控制)\Graphics\res
?????目錄??????????0??2011-11-19?13:01??VC顯示圖片(帶滾動(dòng)條控制)\Graphics
?????目錄??????????0??2011-11-19?13:07??VC顯示圖片(帶滾動(dòng)條控制)
............此處省略3個(gè)文件信息
評(píng)論
共有 條評(píng)論