資源簡介
用VC++實現打開并顯示bmp圖片,大家可以利用這個程序打開圖片。

代碼片段和文件信息
//?ex124.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ex124.h“
#include?“MainFrm.h“
#include?“ex124Doc.h“
#include?“ex124View.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CEx124App
BEGIN_MESSAGE_MAP(CEx124App?CWinApp)
//{{AFX_MSG_MAP(CEx124App)
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()
/////////////////////////////////////////////////////////////////////////////
//?CEx124App?construction
CEx124App::CEx124App()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CEx124App?object
CEx124App?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CEx124App?initialization
BOOL?CEx124App::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();??//?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(CEx124Doc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CEx124View));
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->UpdateWindow();
return?TRUE;
}
/////////
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-12-13?17:20??圖像顯示\
?????目錄???????????0??2012-12-13?17:22??圖像顯示\ex124\
?????目錄???????????0??2012-12-13?17:22??圖像顯示\ex124\Debug\
?????文件??????118828??2012-12-13?17:22??圖像顯示\ex124\Debug\ex124.exe
?????文件??????331668??2012-12-13?17:22??圖像顯示\ex124\Debug\ex124.ilk
?????文件???????22889??2012-12-13?17:17??圖像顯示\ex124\Debug\ex124.obj
?????文件?????5503936??2012-12-13?17:17??圖像顯示\ex124\Debug\ex124.pch
?????文件??????435200??2012-12-13?17:22??圖像顯示\ex124\Debug\ex124.pdb
?????文件????????7244??2012-12-13?17:17??圖像顯示\ex124\Debug\ex124.res
?????文件???????14665??2012-12-13?17:17??圖像顯示\ex124\Debug\ex124Doc.obj
?????文件???????29888??2012-12-13?17:22??圖像顯示\ex124\Debug\ex124View.obj
?????文件???????19912??2012-12-13?17:17??圖像顯示\ex124\Debug\MainFrm.obj
?????文件??????105651??2012-12-13?17:17??圖像顯示\ex124\Debug\StdAfx.obj
?????文件??????214016??2012-12-13?17:22??圖像顯示\ex124\Debug\vc60.idb
?????文件??????364544??2012-12-13?17:22??圖像顯示\ex124\Debug\vc60.pdb
?????文件???????28388??2012-12-10?21:56??圖像顯示\ex124\ex124.aps
?????文件????????2237??2012-12-13?17:04??圖像顯示\ex124\ex124.clw
?????文件????????4191??2012-12-10?21:56??圖像顯示\ex124\ex124.cpp
?????文件????????4534??2012-12-10?21:56??圖像顯示\ex124\ex124.dsp
?????文件?????????533??2012-12-10?21:56??圖像顯示\ex124\ex124.dsw
?????文件????????1345??2012-12-10?21:56??圖像顯示\ex124\ex124.h
?????文件???????74752??2012-12-13?17:22??圖像顯示\ex124\ex124.ncb
?????文件???????53760??2012-12-13?17:22??圖像顯示\ex124\ex124.opt
?????文件????????1119??2012-12-13?17:22??圖像顯示\ex124\ex124.plg
?????文件???????10536??2012-12-10?21:56??圖像顯示\ex124\ex124.rc
?????文件????????1722??2012-12-10?21:56??圖像顯示\ex124\ex124Doc.cpp
?????文件????????1464??2012-12-10?21:56??圖像顯示\ex124\ex124Doc.h
?????文件????????5160??2012-12-13?17:22??圖像顯示\ex124\ex124View.cpp
?????文件????????1976??2012-12-13?17:17??圖像顯示\ex124\ex124View.h
?????文件????????2506??2012-12-10?21:56??圖像顯示\ex124\MainFrm.cpp
?????文件????????1581??2012-12-10?21:56??圖像顯示\ex124\MainFrm.h
............此處省略9個文件信息
評論
共有 條評論