資源簡介
該程序主要解決管理學(xué)生宿舍信息,通過程序錄入學(xué)生的信息以及相對應(yīng)的宿舍號進行記錄,然后方便日后搜尋學(xué)生的信息。基于vc6.0提供的MFC可視化窗口操作界面,只需要懂得windows操作系統(tǒng)的基本操作即可進行操作該程序。在功能上要實現(xiàn)增加信息,刪除信息,修改信息,查找信息。
代碼片段和文件信息
//?hostel.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“hostel.h“
#include?“Password.h“
#include?“MainFrm.h“
#include?“hostelSet.h“
#include?“hostelDoc.h“
#include?“hostelView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CHostelApp
BEGIN_MESSAGE_MAP(CHostelApp?CWinApp)
//{{AFX_MSG_MAP(CHostelApp)
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()
/////////////////////////////////////////////////////////////////////////////
//?CHostelApp?construction
CHostelApp::CHostelApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CHostelApp?object
CHostelApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CHostelApp?initialization
BOOL?CHostelApp::InitInstance()
{
char?uname[]=“asd123“;//修改你用戶名
char?password[]=“456“;//修改你的密碼
int?ncount=0;
while(ncount<3)
{
CPassword?passdlg;
if(passdlg.DoModal()==IDOK)
if(strcmp(passdlg.m_unmeuname)!=0||strcmp(passdlg.m_passwordpassword)!=0)
{
MessageBox(NULL“用戶名或者密碼錯誤““錯誤信息“MB_OK|MB_IConerror);
ncount++;
}
else
break;
else
{
return?FALSE;
}
}
if(ncount>=3)
{
MessageBox(NULL“口令輸入超過三次““即將關(guān)閉窗口“MB_OK|MB_IConerror);
return?FALSE;
}
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_MAINFRA
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-01-02?13:29??hostel1.1\
?????目錄???????????0??2017-01-02?13:29??hostel1.1\Debug\
?????文件????23732270??2017-01-26?19:37??hostel1.1\Debug\hostel.exe
?????文件??????425244??2017-01-26?19:37??hostel1.1\Debug\hostel.ilk
?????文件???????26617??2017-01-01?23:55??hostel1.1\Debug\hostel.obj
?????文件?????5721444??2016-12-29?16:00??hostel1.1\Debug\hostel.pch
?????文件??????549888??2017-01-26?19:37??hostel1.1\Debug\hostel.pdb
?????文件????19656116??2017-01-26?19:37??hostel1.1\Debug\hostel.res
?????文件???????18473??2016-12-30?12:00??hostel1.1\Debug\hostelDoc.obj
?????文件???????16372??2016-12-30?12:01??hostel1.1\Debug\hostelSet.obj
?????文件???????72157??2017-01-02?13:29??hostel1.1\Debug\hostelView.obj
?????文件???????19751??2016-12-29?16:00??hostel1.1\Debug\MainFrm.obj
?????文件???????14276??2017-01-26?19:35??hostel1.1\Debug\Password.obj
?????文件??????107136??2016-12-29?16:00??hostel1.1\Debug\StdAfx.obj
?????文件??????238592??2017-01-26?19:37??hostel1.1\Debug\vc60.idb
?????文件??????380928??2017-01-26?19:35??hostel1.1\Debug\vc60.pdb
?????文件????19696400??2017-01-26?19:36??hostel1.1\hostel.aps
?????文件????????5441??2017-01-26?19:37??hostel1.1\hostel.clw
?????文件????????4802??2017-01-01?20:57??hostel1.1\hostel.cpp
?????文件????????4954??2017-01-26?19:37??hostel1.1\hostel.dsp
?????文件?????????518??2016-12-29?16:00??hostel1.1\hostel.dsw
?????文件????????1356??2016-12-29?16:00??hostel1.1\hostel.h
?????文件??????148480??2017-01-26?19:37??hostel1.1\hostel.ncb
?????文件???????50688??2017-01-26?19:37??hostel1.1\hostel.opt
?????文件?????????902??2017-01-26?19:37??hostel1.1\hostel.plg
?????文件???????17339??2017-01-26?19:36??hostel1.1\hostel.rc
?????文件????????1766??2016-12-29?16:00??hostel1.1\hostelDoc.cpp
?????文件????????1525??2016-12-29?16:00??hostel1.1\hostelDoc.h
?????文件????????1547??2016-12-30?12:00??hostel1.1\hostelSet.cpp
?????文件????????1355??2016-12-30?12:00??hostel1.1\hostelSet.h
?????文件???????14495??2017-01-02?13:29??hostel1.1\hostelView.cpp
............此處省略17個文件信息
評論
共有 條評論