資源簡介
利用MFC和OpenCV實現的圖片瀏覽器,支持放大縮小拖拽

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“PicViewer.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code?!
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-07-22?18:50??ImageProcess\
?????目錄???????????0??2014-07-22?21:46??ImageProcess\PicViewer\
?????目錄???????????0??2014-07-22?21:34??ImageProcess\PicViewer\Debug\
?????文件???????20092??2014-07-22?21:31??ImageProcess\PicViewer\Debug\MainFrm.obj
?????文件??????188478??2014-07-22?21:34??ImageProcess\PicViewer\Debug\PicViewer.exe
?????文件??????346856??2014-07-22?21:34??ImageProcess\PicViewer\Debug\PicViewer.ilk
?????文件???????23279??2014-07-22?21:31??ImageProcess\PicViewer\Debug\PicViewer.obj
?????文件?????6121168??2014-07-22?21:31??ImageProcess\PicViewer\Debug\PicViewer.pch
?????文件??????443392??2014-07-22?21:34??ImageProcess\PicViewer\Debug\PicViewer.pdb
?????文件???????57576??2014-07-22?21:34??ImageProcess\PicViewer\Debug\PicViewer.res
?????文件??????????79??2014-07-22?20:13??ImageProcess\PicViewer\Debug\PicViewer.SUP
?????文件???????16970??2014-07-22?21:31??ImageProcess\PicViewer\Debug\PicViewerDoc.obj
?????文件???????32304??2014-07-22?21:31??ImageProcess\PicViewer\Debug\PicViewerView.obj
?????文件??????109154??2014-07-22?21:31??ImageProcess\PicViewer\Debug\StdAfx.obj
?????文件??????230400??2014-07-22?21:45??ImageProcess\PicViewer\Debug\vc60.idb
?????文件??????397312??2014-07-22?21:31??ImageProcess\PicViewer\Debug\vc60.pdb
?????文件????????2510??2014-07-22?18:51??ImageProcess\PicViewer\MainFrm.cpp
?????文件????????1581??2014-07-22?18:51??ImageProcess\PicViewer\MainFrm.h
?????文件???????94204??2014-07-22?21:34??ImageProcess\PicViewer\PicViewer.aps
?????文件????????2235??2014-07-22?21:45??ImageProcess\PicViewer\PicViewer.clw
?????文件????????4263??2014-07-22?18:51??ImageProcess\PicViewer\PicViewer.cpp
?????文件????????4950??2014-07-22?21:35??ImageProcess\PicViewer\PicViewer.dsp
?????文件?????????541??2014-07-22?18:51??ImageProcess\PicViewer\PicViewer.dsw
?????文件????????1389??2014-07-22?18:51??ImageProcess\PicViewer\PicViewer.h
?????文件???????58368??2014-07-22?21:46??ImageProcess\PicViewer\PicViewer.ncb
?????文件???????50688??2014-07-22?21:46??ImageProcess\PicViewer\PicViewer.opt
?????文件?????????252??2014-07-22?21:45??ImageProcess\PicViewer\PicViewer.plg
?????文件?????????654??2014-07-22?21:46??ImageProcess\PicViewer\PicViewer.positions
?????文件???????11754??2014-07-22?21:34??ImageProcess\PicViewer\PicViewer.rc
?????文件????????2057??2014-07-22?19:49??ImageProcess\PicViewer\PicViewerDoc.cpp
?????文件????????1784??2014-07-22?19:53??ImageProcess\PicViewer\PicViewerDoc.h
............此處省略13個文件信息
- 上一篇:sedumi matlab凸優化工具箱
- 下一篇:C++木馬(源代碼)
評論
共有 條評論