-
大小: 9.04MB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2023-10-10
- 語言: C/C++
- 標(biāo)簽: 課程設(shè)計(jì)??MFC??
資源簡介
一個(gè)小型的停車場管理系統(tǒng),具有停車場相關(guān)的基本操作功能。包含停車場和走道。停車場的車如果停滿了,后面來的車就會(huì)停在走道上,直到停車場有車離開,則走道上的車便可依次進(jìn)入停車場停放。停放的車按時(shí)間長短收費(fèi)。

代碼片段和文件信息
//?Arrive.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“Park.h“
#include?“Arrive.h“
#include?“ParkStack.h“
#include?“ParkDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CArrive?dialog
CArrive::CArrive(CWnd*?pParent?/*=NULL*/)
:?CDialog(CArrive::IDD?pParent)
{
//{{AFX_DATA_INIT(CArrive)
m_park?=?0;
m_Ahour?=?0;
m_Amin?=?0;
m_Anumber?=?0;
//}}AFX_DATA_INIT
}
void?CArrive::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CArrive)
DDX_Control(pDX?IDC_BUTTON1?m_bitA);
DDX_Text(pDX?IDC_EDIT4?m_park);
DDX_Text(pDX?IDC_EDIT2?m_Ahour);
DDV_MinMaxInt(pDX?m_Ahour?0?24);
DDX_Text(pDX?IDC_EDIT3?m_Amin);
DDV_MinMaxInt(pDX?m_Amin?0?59);
DDX_Text(pDX?IDC_EDIT1?m_Anumber);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CArrive?CDialog)
//{{AFX_MSG_MAP(CArrive)
ON_BN_CLICKED(IDOK?OnArrive)
ON_WM_PAINT()
ON_BN_CLICKED(IDC_BUTTON1?OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CArrive?message?handlers
void?CArrive::OnArrive()?
{
//?TODO:?Add?your?control?notification?handler?code?here
}
void?CArrive::OnPaint()?
{
//CPaintDC?dc(this);?//?device?context?for?painting
CPaintDC???dc(this);???
?????????CRect???rect;???
?????????GetClientRect(&rect);???
?????????CDC???dcMem;???
?????????dcMem.CreateCompatibleDC(&dc);???
?????????CBitmap???bmpBackground;???
?????????bmpBackground.LoadBitmap(IDB_BITMAP6);???
?????????????????//IDB_BITMAP是你自己的圖對(duì)應(yīng)的ID???
?????????BITMAP???bitmap;???
?????????bmpBackground.GetBitmap(&bitmap);???
?????????CBitmap???*pbmpOld=dcMem.Selectobject(&bmpBackground);???
?????????dc.StretchBlt(00rect.Width()rect.Height()&dcMem00???
????????bitmap.bmWidthbitmap.bmHeightSRCCOPY);?
//?TODO:?Add?your?message?handler?code?here
//?Do?not?call?CDialog::OnPaint()?for?painting?messages
}
void?CArrive::OnButton1()?
{
//?TODO:?Add?your?control?notification?handler?code?here
UpdateData(true);
CParkApp*?app=(CParkApp*)?AfxGetApp();//獲取全局變量指針
app->ps.Arrival(&app->ps.Enter&app->ps.Waitm_Anumberm_Ahourm_Amin);
m_park=app->ps.m_Apark;
UpdateData(false);
????m_bitA.EnableWindow(false);
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-01-04?13:02??停車場管理系統(tǒng)\
?????目錄???????????0??2013-12-15?12:05??停車場管理系統(tǒng)\Park\
?????文件????????2446??2013-01-02?18:59??停車場管理系統(tǒng)\Park\Arrive.cpp
?????文件????????1350??2012-12-31?23:39??停車場管理系統(tǒng)\Park\Arrive.h
?????目錄???????????0??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\
?????文件???????17561??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Arrive.obj
?????文件????????8213??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Arrive.sbr
?????文件???????18532??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Departure.obj
?????文件????????6857??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Departure.sbr
?????文件???????22634??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\LIST.obj
?????文件????????7168??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\LIST.sbr
?????文件?????5308493??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\Park.exe
?????文件??????262000??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\Park.ilk
?????文件???????23090??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Park.obj
?????文件?????6866872??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Park.pch
?????文件??????410624??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\Park.pdb
?????文件?????4305080??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\Park.res
?????文件????????7043??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Park.sbr
?????文件???????49345??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\ParkDlg.obj
?????文件???????14100??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\ParkDlg.sbr
?????文件???????11525??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\ParkStack.obj
?????文件????????6565??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\ParkStack.sbr
?????文件???????17900??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Show1.obj
?????文件????????6499??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\Show1.sbr
?????文件??????105710??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\StdAfx.obj
?????文件?????1371899??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\StdAfx.sbr
?????文件??????205824??2013-12-15?12:05??停車場管理系統(tǒng)\Park\Debug\vc60.idb
?????文件??????364544??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\vc60.pdb
?????文件???????10118??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\WU.obj
?????文件????????5060??2013-12-15?11:52??停車場管理系統(tǒng)\Park\Debug\WU.sbr
?????文件????????2102??2012-12-31?23:39??停車場管理系統(tǒng)\Park\Departure.cpp
............此處省略65個(gè)文件信息
評(píng)論
共有 條評(píng)論