資源簡介
連接數(shù)據(jù)庫的MFC的C++程序,程序比較完整。請打開時注意數(shù)據(jù)源的路徑,必要時需要重新設(shè)置。

代碼片段和文件信息
//?0.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“0.h“
#include?“MainFrm.h“
#include?“0Doc.h“
#include?“0View.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMy0App
BEGIN_MESSAGE_MAP(CMy0App?CWinApp)
//{{AFX_MSG_MAP(CMy0App)
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()
/////////////////////////////////////////////////////////////////////////////
//?CMy0App?construction
CMy0App::CMy0App()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMy0App?object
CMy0App?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMy0App?initialization
BOOL?CMy0App::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(CMy0Doc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CMy0View));
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;
}
/////////////////////////////////////////////////
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????11005??2015-06-06?13:10??first\0.clw
?????文件???????4147??2015-04-08?16:03??first\0.cpp
?????文件???????6303??2015-06-01?15:29??first\0.dsp
?????文件????????510??2015-04-08?16:03??first\0.dsw
?????文件???????1311??2015-04-08?16:03??first\0.h
?????文件?????451584??2015-06-06?13:15??first\0.ncb
?????文件??????57856??2015-06-06?13:15??first\0.opt
?????文件???????1951??2015-06-06?13:13??first\0.plg
?????文件??????22299??2015-06-06?13:13??first\0.rc
?????文件???????1676??2015-04-08?16:03??first\0Doc.cpp
?????文件???????1434??2015-04-08?16:03??first\0Doc.h
?????文件???????6230??2015-06-06?13:09??first\0View.cpp
?????文件???????1932??2015-06-04?18:11??first\0View.h
?????文件????1237038??2015-05-31?15:00??first\bg1.bmp
?????文件????2304054??2015-05-20?18:16??first\change.bmp
?????文件???????2813??2015-06-02?20:15??first\ChangeInfo.cpp
?????文件???????1303??2015-06-02?20:15??first\ChangeInfo.h
?????文件?????335872??2015-06-04?09:36??first\Databa
?????文件?????245760??2015-06-04?09:36??first\Databa
?????文件????8097850??2015-06-06?13:13??first\Debug\0.exe
?????文件?????480576??2015-06-06?13:13??first\Debug\0.ilk
?????文件??????22924??2015-04-19?16:57??first\Debug\0.obj
?????文件????5492880??2015-04-08?16:26??first\Debug\0.pch
?????文件?????549888??2015-06-06?13:13??first\Debug\0.pdb
?????文件????6596264??2015-06-06?13:13??first\Debug\0.res
?????文件??????14708??2015-04-08?16:26??first\Debug\0Doc.obj
?????文件??????40011??2015-06-06?13:13??first\Debug\0View.obj
?????文件??????20504??2015-06-06?13:13??first\Debug\ChangeInfo.obj
?????文件??????12338??2015-06-06?13:13??first\Debug\Dorminfo.obj
?????文件??????43253??2015-06-06?13:13??first\Debug\EditDlg.obj
............此處省略59個文件信息
評論
共有 條評論