九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

簡(jiǎn)單商品訂購(gòu)管理軟件

上傳人:仙*** 文檔編號(hào):61811186 上傳時(shí)間:2022-03-12 格式:DOC 頁(yè)數(shù):42 大?。?.42MB
收藏 版權(quán)申訴 舉報(bào) 下載
簡(jiǎn)單商品訂購(gòu)管理軟件_第1頁(yè)
第1頁(yè) / 共42頁(yè)
簡(jiǎn)單商品訂購(gòu)管理軟件_第2頁(yè)
第2頁(yè) / 共42頁(yè)
簡(jiǎn)單商品訂購(gòu)管理軟件_第3頁(yè)
第3頁(yè) / 共42頁(yè)

下載文檔到電腦,查找使用更方便

10 積分

下載資源

還剩頁(yè)未讀,繼續(xù)閱讀

資源描述:

《簡(jiǎn)單商品訂購(gòu)管理軟件》由會(huì)員分享,可在線閱讀,更多相關(guān)《簡(jiǎn)單商品訂購(gòu)管理軟件(42頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。

1、簡(jiǎn)單商品訂購(gòu)管理軟件 重慶大學(xué)實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)題目: 簡(jiǎn)單商品訂購(gòu)管理軟件 學(xué) 院: 計(jì)算機(jī)學(xué)院 專業(yè)班級(jí): 年 級(jí): 2011級(jí) 姓 名: 學(xué) 號(hào): 完成時(shí)間: 2013 年 4 月 24 日指導(dǎo)教師: 重慶大學(xué)教務(wù)處制實(shí)驗(yàn)項(xiàng)目指導(dǎo)教師評(píng)定成績(jī)表學(xué)號(hào):姓名:班級(jí): 項(xiàng)目分值參考標(biāo)準(zhǔn)評(píng)分學(xué)習(xí)態(tài)度10積極與老師、助教討論(10分)學(xué)習(xí)馬虎,紀(jì)律渙散(5分)缺勤(0分)軟件/系統(tǒng)質(zhì)量60功能考慮完善,界面友好,Bug極少,針對(duì)異常情況有處理(55-60分)功能考慮完善,界面良好,有一定Bug(49-54分)功能較完善,Bug較多(43-48分)完成程序基本功能(36-42分)部分實(shí)現(xiàn),無法運(yùn)行(1-3

2、5分)抄襲、被抄襲(0分)實(shí)驗(yàn)演示答辯10重點(diǎn)突出、有特色、專業(yè)知識(shí)掌握好、能流暢回答老師提問(9-10分)有一定特色、能較好地回答老師提問(7-8分)能講解項(xiàng)目的關(guān)鍵實(shí)現(xiàn),能回答基本問題(0-6分)實(shí)驗(yàn)報(bào)告撰寫質(zhì)量20文檔規(guī)范,文字、圖表表達(dá)清楚(18-20分)文檔較規(guī)范,文字、圖表表達(dá)較清楚(11-17分)文檔不規(guī)范,內(nèi)容空泛、結(jié)構(gòu)混亂(0-10分)指導(dǎo)教師評(píng)定成績(jī):指導(dǎo)教師簽名: 年 月 日重慶大學(xué)本科學(xué)生實(shí)驗(yàn)項(xiàng)目任務(wù)書實(shí)驗(yàn)題目簡(jiǎn)單商品訂購(gòu)管理軟件學(xué)院計(jì)算機(jī)學(xué)院專業(yè)年級(jí)2011級(jí)任務(wù)描述: 以項(xiàng)目組形式,實(shí)現(xiàn)項(xiàng)目所要求的功能。項(xiàng)目組每組14人,其中項(xiàng)目組長(zhǎng)1人,負(fù)責(zé)項(xiàng)目整體進(jìn)度和協(xié)調(diào)項(xiàng)目

3、組成員之間的工作,要求項(xiàng)目組成員分工明確,各自的工作量均衡,并在實(shí)踐報(bào)告中注明每個(gè)人的分工和工作量。 綜合運(yùn)用C+編程技術(shù)和數(shù)據(jù)結(jié)構(gòu)知識(shí),用VS2010或QT設(shè)計(jì)實(shí)現(xiàn)一個(gè)簡(jiǎn)單的商品訂購(gòu)管理軟件,該軟件能夠模擬實(shí)現(xiàn)簡(jiǎn)單的庫(kù)存、訂購(gòu)、發(fā)貨等功能。最后提交完整的設(shè)計(jì)報(bào)告和軟件程序拷貝。設(shè)計(jì)要求:p You are to create programs that keep track of inventory and shipping at a store or business of your choosing. Suppose there are five different categories

4、 of items, and there are five linked lists correspondingly. When items are made, they are put into certain linked list inventory according to its category. When you ship something, it comes out of inventory and goes into a shipping queue. When an item is delivered, it is taken out of the shipping qu

5、eue. You should keep a list of all delivered items. Users of your system should be able to do the following:1.Input an item (category, name) and an amount. The item and amount should be inserted into a linked list of inventory. 2.Push a button to get a list displayed of all the items and their quant

6、ities in the inventory. 3.Push a button to take a specified item from inventory and put it in a shipping queue. 4.Push a button to get a list displayed of all the items that are currently shipping.5.Push a button to indicate that a shipped item has been delivered and should be taken out of the shipp

7、ing queue. Shipped items are put in and taken out FIFO.6. Push a button to display all the things that have been delivered.p You are to create classes for the different data structures and nodes. You also need a driver program that takes user input and manipulates a node object and prints output. Th

8、e driver should be written as a C+ application with buttons and text input and output.參考資料:p Data Structures and Algorithm Analysis (C+ Version) Clifford A. Shafferp Data Structure and Algorithm Analysis in C+ (Third Edition),Mark Allen Weiss, Pearson Education, 2006. p Data Structures, Algorithms,

9、and Applications in C+,Sartaj Sahni, McGraw-Hill, 1998. p 數(shù)據(jù)結(jié)構(gòu)( C 語言版),嚴(yán)蔚敏,吳偉民編著,清華大學(xué)出版社,2007年第1版 任務(wù)下達(dá)日期 2013 年 4月 10 日完成日期 2013 年 4 月 22 日說明:學(xué)院、專業(yè)、年級(jí)均填全稱,如:計(jì)算機(jī)學(xué)院、計(jì)算機(jī)科學(xué)與技術(shù)、2011。實(shí)驗(yàn)報(bào)告正文一 需求分析隨著現(xiàn)代科學(xué)技術(shù)的迅猛發(fā)展,計(jì)算機(jī)技術(shù)已滲透到各個(gè)領(lǐng)域,成為各行業(yè)必不可少的工具。特別是Internet技術(shù)的推廣和信息高速公路的建立,使IT產(chǎn)業(yè)在市場(chǎng)競(jìng)爭(zhēng)中越發(fā)顯示出其獨(dú)特的優(yōu)勢(shì),步入數(shù)字化時(shí)代,有巨大的數(shù)據(jù)信息等待著加

10、工處理和傳輸,這使得對(duì)數(shù)據(jù)庫(kù)的進(jìn)一步開發(fā)和利用顯得尤為迫切。 對(duì)于這些企業(yè)的資源管理,信息的存儲(chǔ)和處理也顯的迫切需要。 要適應(yīng)市場(chǎng)競(jìng)爭(zhēng),就需要有高效的處理方式和管理方法,因此電算化進(jìn)是必不可少的。二.系統(tǒng)設(shè)計(jì)1.類圖2.模塊圖簡(jiǎn)單商品訂購(gòu)管理軟件退出所有已發(fā)的貨物發(fā)貨已經(jīng)預(yù)定的所有貨物訂貨所有商品及其數(shù)量商品入庫(kù)登記用戶輸入(1).用戶輸入我在這個(gè)窗口里增加了兩個(gè)用戶輸入,一個(gè)為了入庫(kù)登記貨物,一個(gè)為了訂貨。(a).貨物分類:由于商店里的貨物分類是確定的,所以選擇MFC里的組合框來實(shí)現(xiàn)。組合框的style選擇droplist,初始化組合框的5個(gè)初始值。(b).名字:商品的名字由用戶自己輸入,所

11、以選擇編輯框?qū)崿F(xiàn)。為編輯框添加CString類型的變量。(c).數(shù)量:數(shù)量同樣選擇編輯框?qū)崿F(xiàn)。為編輯框添加int 類型的變量,并將編輯框的屬性改為number ,即只允許用戶輸入整型數(shù)字。(2).商品入庫(kù)登記商店里共有五類貨物,所以需要定義五個(gè)鏈表來存放入庫(kù)的貨物,并且在入庫(kù)登記按鈕后添加一個(gè)編輯框(編輯框的屬性為“read only”,即只顯示提示信息,不允許用戶改變它的值),用來提示用戶操作是否成功。當(dāng)組合框的值被選擇為相應(yīng)的貨物種類時(shí),判斷名字的編輯框里是否有輸入而且數(shù)量的編輯框里的輸入是否大于0。(a).如果名字的編輯框里沒有輸入或者數(shù)量的編輯框里的數(shù)字小于等于0,則在提示的編輯框里顯

12、示“請(qǐng)檢查輸入”。(b). 如果名字的編輯框里有輸入而且數(shù)量的編輯框里的數(shù)字大于0。 a).如果該類型鏈表長(zhǎng)度為0,則直接append一個(gè)節(jié)點(diǎn),并將類型-名字-數(shù)量的值傳給節(jié)點(diǎn)。 b).如果該類型鏈表長(zhǎng)度不為0,則在鏈表中從前往后查找是否有該名字: 如果有該名字的話,直接增加該節(jié)點(diǎn)的數(shù)量元素,不增加新的節(jié)點(diǎn);如果遍歷整個(gè)鏈表,沒有找到該名字的話,append一個(gè)新的節(jié)點(diǎn),并將類型-名字-數(shù)量的值傳給節(jié)點(diǎn)。當(dāng)點(diǎn)擊“入庫(kù)登記按鈕”,提示編輯框里顯示“入庫(kù)成功”。(3).商店所有貨物及其數(shù)量在窗口中間添加一個(gè)大的編輯框(編輯框的屬性為“read only”,只顯示,不允許用戶修改它的值),用于展示相

13、關(guān)貨物,“商店所有貨物及其數(shù)量”、“已經(jīng)預(yù)定的所有貨物”、“發(fā)貨”、“所有已發(fā)的貨物”。(a).如果五個(gè)鏈表的長(zhǎng)度均為0,則當(dāng)點(diǎn)擊“商店所有貨物及其按鈕”,在“相關(guān)貨物”編輯框里顯示“抱歉,商店里暫時(shí)沒有商品”。(b).如果五個(gè)鏈表中有鏈表的長(zhǎng)度不為0,則檢查每個(gè)鏈表,將所有長(zhǎng)度不為0的鏈表的所有節(jié)點(diǎn)展示在“相關(guān)貨物”的編輯框里。(4).訂貨預(yù)定的貨物遵守先訂貨先發(fā)貨原則,所以需要定義一個(gè)隊(duì)列來存放預(yù)定的貨物,并且在“預(yù)定”按鈕后添加一個(gè)編輯框(編輯框的屬性為“read only”,即只顯示提示信息,不允許用戶改變它的值),用來提示用戶操作是否成功。當(dāng)組合框的值被選擇為相應(yīng)的貨物種類時(shí),判斷名

14、字的編輯框里是否有輸入而且數(shù)量的編輯框里的輸入是否大于0。(a).如果名字的編輯框里沒有輸入或者數(shù)量的編輯框里的數(shù)字小于等于0,則在提示的編輯框里顯示“請(qǐng)檢查輸入”。(b).如果名字的編輯框里有輸入而且數(shù)量的編輯框里的數(shù)字大于0檢查對(duì)應(yīng)類型鏈表里是否有該名字。 a).如果沒有該名字的話,則在“相關(guān)貨物”提示編輯框里顯示“無此商品”。 b).如果有該名字的話,則在對(duì)應(yīng)節(jié)點(diǎn)里檢查貨物的數(shù)量是否大于等于訂貨的數(shù)量:如果貨物的數(shù)量大于等于訂貨的數(shù)量,則在提示編輯框里顯示“訂貨成功”,并且相應(yīng)鏈表節(jié)點(diǎn)的貨物數(shù)量減少訂貨的數(shù)量;如果貨物的數(shù)量小于訂貨的數(shù)量,則在提示編輯框里顯示“數(shù)量不足”。(5).已經(jīng)預(yù)

15、定的所有貨物(a).如果預(yù)定隊(duì)列長(zhǎng)度為0,則在“相關(guān)貨物”編輯框里顯示“無預(yù)定的貨物或者預(yù)定的貨物已發(fā)完”。(b). 如果預(yù)定隊(duì)列長(zhǎng)度為0,則按照先訂貨先發(fā)貨順序?qū)㈩A(yù)定隊(duì)列的所有節(jié)點(diǎn)展示在“相關(guān)貨物”編輯框里。(6).發(fā)貨定義一個(gè)已發(fā)貨物鏈表存放已發(fā)貨物。(a).如果預(yù)定隊(duì)列的長(zhǎng)度為0,則在“相關(guān)貨物”編輯框里顯示“沒有預(yù)定的貨物或所有預(yù)定的貨物均已發(fā)貨”。(b). 如果預(yù)定隊(duì)列的長(zhǎng)度不為0,則當(dāng)點(diǎn)擊“發(fā)貨”按鈕時(shí),在已發(fā)貨物鏈表里增加一個(gè)節(jié)點(diǎn),并將隊(duì)頂節(jié)點(diǎn)的元素的值傳給鏈表新的節(jié)點(diǎn),然后刪除隊(duì)頂節(jié)點(diǎn),并在“相關(guān)貨物”編輯框里提示“訂貨成功”。(7).所有已發(fā)貨物(a).如果已發(fā)貨物鏈表長(zhǎng)度等

16、于0,則在“相關(guān)貨物”編輯框里提示“未發(fā)過貨”。(b).如果已發(fā)貨物鏈表長(zhǎng)度不等于0,則在“相關(guān)貨物”編輯框里展示所有已發(fā)貨物。(8).退出將MFC生成的對(duì)話框里的“取消”按鈕的名字改為“退出”即可實(shí)現(xiàn)退出功能。三.關(guān)鍵代碼描述1./link.h #ifndef LINK_H#define LINK_H/ Singly linked list node#define NULL 0template class Link public: E sort; /將link的元素改為sort,name,amount三個(gè)元素 E name; int amount;/并將amount的類型改為int Link

17、 *next; / Pointer to next node in list / Constructors Link(const E&sortval,const E& nameval,const int& amountval, Link* nextval =NULL) sort=sortval; name = nameval;amount = amountval; next = nextval; Link(Link* nextval =NULL) next = nextval; ;#endif;為了實(shí)現(xiàn)在鏈表里能夠存儲(chǔ)貨物種類、貨物名字和貨物數(shù)量,所以將link的節(jié)點(diǎn)元素改為E sort;E

18、name;int amount;Link *next;。頭文件中的linkque.h和link,h的定義是相同的,只是我為了方便又定義了一個(gè)linkque.h。2./list.h和llist.h/list.h#ifndef LIST_H#define LIST_Htemplate class List / List ADTprivate: void operator =(const List&) / Protect assignment List(const List&) / Protect copy constructorpublic: List() / Default constructo

19、r virtual List() / Base destructor virtual void clear() = 0; virtual void insert(const E& sortval,const E& nameval,const int& amountval) = 0; virtual void append(const E&sortval,const E& nameval,const int& amountval) = 0; virtual int DeAmount(int i)=0;/將amount的值減少i virtual void moveToStart() = 0; vi

20、rtual void moveToEnd() = 0; virtual void prev() = 0; virtual void next() = 0; virtual int length() const = 0; virtual int currPos() const = 0; virtual void moveToPos(int pos) = 0; virtual int EnAmount(int i) = 0;/將amount的值增加i virtual CString GoodsSort()=0;/獲取當(dāng)前節(jié)點(diǎn)的sort virtual CString GoodsName()=0;/

21、 獲取當(dāng)前節(jié)點(diǎn)的name virtual int GoodsNum()=0;/獲取當(dāng)前節(jié)點(diǎn)的amount;#endif/llist.h#includestdafx.h#include list.h#includelink.h#define defaultSize 50#define NULL 0#include#includetemplate class LList: public List private: Link* head; / Pointer to list header Link* tail; / Pointer to last element Link* curr; / Acce

22、ss to current element int cnt; / Size of list void init() / Intialization helper method curr = tail = head = new Link; cnt = 0; void removeall() / Return link nodes to free store while(head != NULL) curr = head; head = head-next; delete curr; public: LList(int size=defaultSize) init(); / Constructor

23、 LList() removeall(); / Destructor void print() const; / Print list contents void clear() removeall(); init(); / Clear list / Insert it at current position void insert(const E&sort,const E& it,const int& num) curr-next = new Link(sort,it,num, curr-next); if (tail = curr) tail = curr-next; / New tail

24、 cnt+; / Append it to list void append(const E&sort,const E& it,const int& num) tail = tail-next = new Link(sort,it,num, NULL); cnt+; int DeAmount(int i)/ 將amount的值減少i return curr-amount-=i; void moveToStart() / Place curr at list start curr = head; void moveToEnd() / Place curr at list end curr = t

25、ail; / Move curr one step left; no change if already at front void prev() if (curr = head) return; / No previous element Link* temp = head; / March down list until we find the previous element while (temp-next!=curr) temp=temp-next; curr = temp; / Move curr one step right; no change if already at en

26、d void next() if (curr != tail) curr = curr-next; int length() const return cnt; / Return length / Return the position of the current element int currPos() const Link* temp = head; int i; for (i=0; curr != temp; i+) temp = temp-next; return i; / Move down list to pos position void moveToPos(int pos)

27、 assert (pos=0)&(pos=cnt), Position out of range); curr = head; for(int i=0; inext; int EnAmount(int i)/ 將amount的值增加i return curr-amount+=i; CString GoodsSort()/獲取當(dāng)前節(jié)點(diǎn)的sort return curr-sort; CString GoodsName()/獲取當(dāng)前節(jié)點(diǎn)的name return curr-name; int GoodsNum()/獲取當(dāng)前節(jié)點(diǎn)的amount return curr-amount; ;在鏈表里進(jìn)行相應(yīng)的

28、處理時(shí),我們需要獲取當(dāng)前節(jié)點(diǎn)貨物的種類、貨物的名字、貨物的數(shù)量,所以我增加了GoodsSort()、GoodsName()、GoodsNum()三個(gè)函數(shù),同時(shí)在入庫(kù)或者訂貨時(shí),我們也需要對(duì)貨物的數(shù)量進(jìn)行增加處理或者減少處理,所以我增加了DeAmount(int i)、EnAmount(int i)兩個(gè)函數(shù)來實(shí)現(xiàn)。3./queue.h和lqueue.h/queue.h#ifndef QUEUE_H#define QUEUE_H/ Abstract queue classtemplate class Queue private: void operator =(const Queue&) / Pr

29、otect assignment Queue(const Queue&) / Protect copy constructorpublic: Queue() / Default virtual Queue() / Base destructor virtual void clear() = 0; virtual void enqueue(const E&,const E&,const int&) = 0; virtual E dequeue() = 0; virtual void moveToFront()=0;/將指針移動(dòng)到隊(duì)列的front位置 virtual const E& frontS

30、ort()const=0;/獲取當(dāng)前節(jié)點(diǎn)的sort virtual const E& frontName()const=0;/獲取 當(dāng)前節(jié)點(diǎn)的name virtual const int& frontAmount()const=0;/獲取當(dāng)前節(jié)點(diǎn)的amount virtual int length() const = 0; virtual void next()=0;/將當(dāng)前指針向后移動(dòng)一個(gè)位置;#endif /lqueue.h#includelinkque.h#include queue.h#define defaultSize 50#define NULL 0#include#includ

31、e#include StdAfx.htemplate class LQueue: public Queue private: Linkque* front; / Pointer to front queue node Linkque* rear; / Pointer to rear queue node Linkque* ltemp; int size; / Number of elements in queuepublic: LQueue(int sz =defaultSize) / Constructor front = rear = new Linkque(); size = 0; LQ

32、ueue() clear(); delete front; / Destructor void clear() / Clear queue while(front-next!=NULL) rear=front-next; front-next=rear-next; delete rear;rear=front;size=0; void enqueue(const E& sort,const E& it,const int& num) / Put element on rear rear-next = new Linkque(sort,it,num,NULL); rear = rear-next

33、; size+; E dequeue() / Remove element from front assert(size != 0, Queue is empty);E sort= front-next-sort; E it = front-next-name; / Store dequeued value Linkque* ltemp = front-next; / Hold dequeued link front-next = ltemp-next; / Advance front if (rear = ltemp) rear = front; / Dequeue last element

34、 delete ltemp; / Delete link size -; return sort,it; / Return element value void moveToFront()/將指針移動(dòng)到隊(duì)列的front位置 ltemp=front; const E& frontSort()const/獲取當(dāng)前節(jié)點(diǎn)的sort assert(ltemp-next!=NULL, Queue is empty);return ltemp-next-sort; const E& frontName()const/獲取當(dāng)前節(jié)點(diǎn)的name assert(ltemp-next!=NULL, Queue is

35、empty);return ltemp-next-name; const int& frontAmount()const/獲取當(dāng)前節(jié)點(diǎn)的 amount assert(ltemp-next!=NULL, Queue is empty);return ltemp-next-amount; void next()/將當(dāng)前指針向后移動(dòng)一個(gè)位置 assert(ltemp-next!=NULL,No Value); ltemp=ltemp-next; virtual int length() const return size; ;在對(duì)隊(duì)列進(jìn)行處理時(shí),我們需要將所有已預(yù)定的貨物全部展示出來,所以我們需要獲

36、取從前所有的位置和每個(gè)位置上節(jié)點(diǎn)的值,所以我增加了moveToFront()、next()、frontSort()、frontName()、frontAmount()五個(gè)函數(shù)。(4)./ ClothesStoreDlg.h和ClothesStoreDlg.cpp/ ClothesStoreDlg.h#pragma once#include afxwin.h/ CClothesStoreDlg 對(duì)話框class CClothesStoreDlg : public CDialogEx/ 構(gòu)造public:CClothesStoreDlg(CWnd* pParent = NULL);/ 標(biāo)準(zhǔn)構(gòu)造函數(shù)

37、/ 對(duì)話框數(shù)據(jù)enum IDD = IDD_CLOTHESSTORE_DIALOG ;protected:virtual void DoDataExchange(CDataExchange* pDX);/ DDX/DDV 支持/ 實(shí)現(xiàn)protected:HICON m_hIcon;/ 生成的消息映射函數(shù)virtual BOOL OnInitDialog();afx_msg void OnSysCommand(UINT nID, LPARAM lParam);afx_msg void OnPaint();afx_msg HCURSOR OnQueryDragIcon();DECLARE_MESS

38、AGE_MAP();public:afx_msg void OnBnClickedSplit1();int m_editNum0;int e_editNum1;CComboBox m_comboSort; CString m_editName0;CComboBox m_comboSorted;CString m_editName1;CString m_editSuc;CString m_editSuccess;CString m_editdisply;afx_msg void OnEnChangeEdit1();afx_msg void OnEnChangeEdit2();afx_msg vo

39、id OnEnChangeEdit3();afx_msg void OnEnChangeEdit4();afx_msg void OnBnClickedButton1();afx_msg void OnBnClickedButton3();afx_msg void OnBnClickedButton4();afx_msg void OnBnClickedButton5();afx_msg void OnCbnSelchangeCombo2();afx_msg void OnCbnSelchangeCombo3();afx_msg void OnBnClickedButton6();afx_ms

40、g void OnBnClickedButton7();afx_msg void OnBnClickedButton2();afx_msg void OnEnChangeEdit5();afx_msg void OnEnChangeEdit6();afx_msg void OnEnChangeEdit7();/ ClothesStoreDlg.cpp#include stdafx.h#include ClothesStore.h#include ClothesStoreDlg.h#include afxdialogex.h#include#includelist.h#includellist.

41、h#includelink.h#includelinkque.h#includequeue.h#includelqueue.husing namespace std;#ifdef _DEBUG#define new DEBUG_NEW#endif LListWD;/五個(gè)貨物入庫(kù)鏈表LListMC;/LListCC;/LListWB;/LListMB;/LQueueOr;/訂貨隊(duì)列LListDe;/發(fā)貨鏈表/ 用于應(yīng)用程序“關(guān)于”菜單項(xiàng)的 CAboutDlg 對(duì)話框class CAboutDlg : public CDialogExpublic:CAboutDlg();/ 對(duì)話框數(shù)據(jù)enum I

42、DD = IDD_ABOUTBOX ;protected:virtual void DoDataExchange(CDataExchange* pDX); / DDX/DDV 支持/ 實(shí)現(xiàn)protected:DECLARE_MESSAGE_MAP();CAboutDlg:CAboutDlg() : CDialogEx(CAboutDlg:IDD)void CAboutDlg:DoDataExchange(CDataExchange* pDX)CDialogEx:DoDataExchange(pDX);BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)END_MESS

43、AGE_MAP()/ CClothesStoreDlg 對(duì)話框CClothesStoreDlg:CClothesStoreDlg(CWnd* pParent /*=NULL*/): CDialogEx(CClothesStoreDlg:IDD, pParent) /構(gòu)造函數(shù), m_editNum0(0), m_editName0(_T(), m_editName1(_T(), e_editNum1(0), m_editSuc(_T(), m_editSuccess(_T(), m_editdisply(_T()m_hIcon = AfxGetApp()-LoadIcon(IDR_MAINFRA

44、ME);void CClothesStoreDlg:DoDataExchange(CDataExchange* pDX)CDialogEx:DoDataExchange(pDX);DDX_Control(pDX, IDC_COMBO2, m_comboSort);DDX_Control(pDX, IDC_COMBO3, m_comboSorted);DDX_Text(pDX, IDC_EDIT1, m_editName0);DDX_Text(pDX, IDC_EDIT2, m_editNum0);DDX_Text(pDX, IDC_EDIT3, m_editName1);DDX_Text(pD

45、X, IDC_EDIT2, m_editNum0);DDX_Text(pDX, IDC_EDIT4, e_editNum1);DDX_Text(pDX, IDC_EDIT5, m_editSuc);DDX_Text(pDX, IDC_EDIT6, m_editSuccess);DDX_Text(pDX, IDC_EDIT7, m_editdisply);BEGIN_MESSAGE_MAP(CClothesStoreDlg, CDialogEx)ON_WM_SYSCOMMAND()ON_WM_PAINT()ON_WM_QUERYDRAGICON()ON_EN_CHANGE(IDC_EDIT1,

46、&CClothesStoreDlg:OnEnChangeEdit1)ON_EN_CHANGE(IDC_EDIT2, &CClothesStoreDlg:OnEnChangeEdit2)ON_BN_CLICKED(IDC_BUTTON3, &CClothesStoreDlg:OnBnClickedButton3)ON_BN_CLICKED(IDC_BUTTON4, &CClothesStoreDlg:OnBnClickedButton4)ON_BN_CLICKED(IDC_BUTTON5, &CClothesStoreDlg:OnBnClickedButton5)ON_EN_CHANGE(IDC

47、_EDIT4, &CClothesStoreDlg:OnEnChangeEdit4)ON_CBN_SELCHANGE(IDC_COMBO2, &CClothesStoreDlg:OnCbnSelchangeCombo2)ON_CBN_SELCHANGE(IDC_COMBO3, &CClothesStoreDlg:OnCbnSelchangeCombo3) ON_BN_CLICKED(IDC_BUTTON6, &CClothesStoreDlg:OnBnClickedButton6)ON_BN_CLICKED(IDC_BUTTON7, &CClothesStoreDlg:OnBnClickedB

48、utton7)ON_BN_CLICKED(IDC_BUTTON2, &CClothesStoreDlg:OnBnClickedButton2)ON_EN_CHANGE(IDC_EDIT5, &CClothesStoreDlg:OnEnChangeEdit5)ON_EN_CHANGE(IDC_EDIT6, &CClothesStoreDlg:OnEnChangeEdit6)ON_EN_CHANGE(IDC_EDIT7, &CClothesStoreDlg:OnEnChangeEdit7)ON_WM_CTLCOLOR()END_MESSAGE_MAP()/ CClothesStoreDlg 消息處

49、理程序BOOL CClothesStoreDlg:OnInitDialog()CDialogEx:OnInitDialog();/ 將“關(guān)于.”菜單項(xiàng)添加到系統(tǒng)菜單中。/ IDM_ABOUTBOX 必須在系統(tǒng)命令范圍內(nèi)。ASSERT(IDM_ABOUTBOX & 0xFFF0) = IDM_ABOUTBOX);ASSERT(IDM_ABOUTBOX AppendMenu(MF_SEPARATOR);pSysMenu-AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);/ 設(shè)置此對(duì)話框的圖標(biāo)。當(dāng)應(yīng)用程序主窗口不是對(duì)話框時(shí),框架將自動(dòng)/ 執(zhí)行此操作S

50、etIcon(m_hIcon, TRUE);/ 設(shè)置大圖標(biāo)SetIcon(m_hIcon, FALSE);/ 設(shè)置小圖標(biāo)/ TODO: 在此添加額外的初始化代碼/商品入庫(kù)處組合框初始化,五個(gè)分類鏈表 m_comboSort.AddString(_T(女裝); m_comboSort.AddString(_T(男裝); m_comboSort.InsertString(1, _T(童裝); m_comboSort.InsertString(2, _T(男包);m_comboSort.InsertString(3, _T(女包); / 默認(rèn)選擇第一項(xiàng) m_comboSort.SetCurSel(0

51、); /訂貨處組合框初始化,五個(gè)分類鏈表 m_comboSorted.AddString(_T(女裝); m_comboSorted.AddString(_T(男裝); m_comboSorted.InsertString(1, _T(童裝); m_comboSorted.InsertString(2, _T(男包);m_comboSorted.InsertString(3, _T(女包); / 默認(rèn)選擇第一項(xiàng) m_comboSorted.SetCurSel(0); return TRUE; / 除非將焦點(diǎn)設(shè)置到控件,否則返回 TRUEvoid CClothesStoreDlg:OnSysCo

52、mmand(UINT nID, LPARAM lParam)if (nID & 0xFFF0) = IDM_ABOUTBOX)CAboutDlg dlgAbout;dlgAbout.DoModal();elseCDialogEx:OnSysCommand(nID, lParam);/ 如果向?qū)υ捒蛱砑幼钚』粹o,則需要下面的代碼/ 來繪制該圖標(biāo)。對(duì)于使用文檔/視圖模型的 MFC 應(yīng)用程序,/ 這將由框架自動(dòng)完成。void CClothesStoreDlg:OnPaint() if (IsIconic() CPaintDC dc(this); / 用于繪制的設(shè)備上下文 SendMessage(W

53、M_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc(), 0); / 使圖標(biāo)在工作區(qū)矩形中居中 int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; / 繪制圖標(biāo) dc.DrawIcon(x, y, m_hIcon); else CPaintDC dc(this); /添加背景 CRect rect; GetClientRect(&rect); CDC dcMem; dcMem.CreateCompatibleDC(&dc); CBitmap bmpBackground; bmpBackground.LoadBitmap(IDB_BITMAP1); /IDB_BITMAP是背景位圖對(duì)應(yīng)的ID BITMAP bitmap; bmpBackground.GetBitmap(&bitma

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!