ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:139.78KB ,
资源ID:16396524      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/16396524.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(软件体系结构实验一实验报告文档格式.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

软件体系结构实验一实验报告文档格式.docx

1、步骤2:将图示的调用结构用菜单消息实现。(1)每个下层模块用子菜单呈现。(2)底层模块用对话框实现。过程:1、运行VC+6.0开发平台,选择“文件”“新建”“MFC Appwizard(exe)”,工程名称设为“Hotel_MIS”,选择工程存放路径,确定2、选择“单文档”,点击“完成”按钮,进入如图1界面图13、选择“ResourceView”选项卡,依次展开“Hotel_MIS resources”“Menu”文件夹,双击Menu文件夹下的“IDR_MAINFRAME”,出现如图2所示结果图24、添加功能模块,如图3所示图35、在“ResourceView”选项卡,依次展开“Hotel_M

2、IS resources”“Dialog”文件夹,右键点击“Dialog”创建对话框,如图4所示图46、在每个功能模块的属性框将ID改为IDD_ABOUTBOX,编译执行结果如图5所示图5步骤3:总结实验和设计经验,编写实验报告详细代码:/ Hotel_MIS.cpp : Defines the class behaviors for the application./#include stdafx.hHotel_MIS.hMainFrm.hHotel_MISDoc.hHotel_MISView.h#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FI

3、LEstatic char THIS_FILE = _FILE_;#endif/ CHotel_MISAppBEGIN_MESSAGE_MAP(CHotel_MISApp, CWinApp) /AFX_MSG_MAP(CHotel_MISApp) 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_MA

4、P / 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()/ CHotel_MISApp constructionCHotel_MISApp:CHotel_MISApp() / TODO:

5、 add construction code here, / Place all significant initialization in InitInstance/ The one and only CHotel_MISApp objectCHotel_MISApp theApp;/ CHotel_MISApp initializationBOOL CHotel_MISApp:InitInstance() AfxEnableControlContainer(); / Standard initialization / If you are not using these features

6、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

7、/ Change the registry key under which our settings are stored. 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 (includin

8、g MRU) / Register the applications document templates. Document templates / serve as the connection between documents, frame windows and views. CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CHotel_MISDoc), RUNTIME_CLASS(CMainFrame), / main SDI

9、frame window RUNTIME_CLASS(CHotel_MISView); 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

10、and only window has been initialized, so show and update it. m_pMainWnd-ShowWindow(SW_SHOW);UpdateWindow(); return TRUE;/ CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialogpublic: CAboutDlg();/ Dialog Data /AFX_DATA(CAboutDlg) enum IDD = IDD_ABOUTBOX ; /AFX_DATA / ClassWizard genera

11、ted virtual function overrides /AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); / DDX/DDV support /AFX_VIRTUAL/ Implementationprotected: /AFX_MSG(CAboutDlg) / No message handlers /AFX_MSG DECLARE_MESSAGE_MAP();CAboutDlg:CAboutDlg() : CDialog(CAboutDlg:IDD) /AFX_DAT

12、A_INIT(CAboutDlg) /AFX_DATA_INITvoid CAboutDlg:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CAboutDlg) /AFX_DATA_MAPBEGIN_MESSAGE_MAP(CAboutDlg, CDialog) /AFX_MSG_MAP(CAboutDlg)/ App command to run the dialogvoid CHotel_MISApp:OnAppAbout() CAboutDlg aboutDlg; aboutDl

13、g.DoModal();/ CHotel_MISApp message handlers/ Hotel_MISView.cpp : implementation of the CHotel_MISView class/ CHotel_MISViewIMPLEMENT_DYNCREATE(CHotel_MISView, CView)BEGIN_MESSAGE_MAP(CHotel_MISView, CView) /AFX_MSG_MAP(CHotel_MISView) / Standard printing commands ON_COMMAND(ID_FILE_PRINT, CView:OnF

14、ilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CView: ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView:OnFilePrintPreview)/ CHotel_MISView construction/destructionCHotel_MISView:CHotel_MISView() add construction code hereCHotel_MISView()BOOL CHotel_MISView:PreCreateWindow(CREATESTRUCT& cs) Modify the Window clas

15、s or styles here by modifying / the CREATESTRUCT cs return CView:PreCreateWindow(cs);/ CHotel_MISView drawingvoid CHotel_MISView:OnDraw(CDC* pDC) CHotel_MISDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); add draw code for native data here/ CHotel_MISView printingOnPreparePrinting(CPrintInfo* pInfo) /

16、 default preparation return DoPreparePrinting(pInfo);OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) add extra initialization before printingOnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) add cleanup after printing/ CHotel_MISView diagnosticsAssertValid() const CView:AssertValid();Dump(CDum

17、pContext& dc) constDump(dc);CHotel_MISDoc* CHotel_MISView:GetDocument() / non-debug version is inline ASSERT(m_pDocument-IsKindOf(RUNTIME_CLASS(CHotel_MISDoc); return (CHotel_MISDoc*)m_pDocument;#endif /_DEBUG/ CHotel_MISView message handlers实验总结:通过这次实验,我对事件驱动的基本架构有所了解,并了解基于事件驱动模式的编程的基本设计方法,对WINDOWS的程序平台上的设计实现方法也有一定掌握,但仍有许多不足之处,比如在编程实现方面仍然很薄弱,我将在今后的学习中加强这方面上的练习。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1