欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    VC大作业分析报告学生信息管理系统.docx

    • 资源ID:1932596       资源大小:50.29KB        全文页数:12页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    VC大作业分析报告学生信息管理系统.docx

    1、VC大作业分析报告学生信息管理系统VC大作业报告(学生信息管理系统) 作者: 日期: 高级程序设计项目训练报告指导教师:黄欢时间 2012 年 7 月 27 日专业年级: 姓名: 学号: 报告分程序功能:1) 学生基本信息录入功能 2) 学生信息查询功能 3) 学生信息的删除学生信息包括:姓名、性别、学号、班级、出生年月、手机号码、已经获得学分等输入输出数据的说明:输入学生信息点击确定,在“学生信息查询”中输入姓名,就可以在“查询结果”中输出相应信息。报告内容一、 分析设计的是一个基于MFC对话框的C+应用程序,创建了一个主对话框,和一些必要的子对话框。在主对话框中添加列表控件用来显示学生的基

    2、本信息。主要用到了在MFC中运用编辑框的只是,还有插入位图。二、 操作运行后点击“学生信息录入”显示: 输入相关信息在确定。在选中信息点击删除,可进行删除操作。点击“学生信息查询”显示:输入名字,若有信息储存,则在查询结果中显示,若无信息储存则显示:主代码:/ zxyDlg.cpp : implementation file/#include stdafx.h#include zxy.h#include zxyDlg.h#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE = _FILE_;#endif/

    3、 CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialogpublic: CAboutDlg();/ Dialog Data /AFX_DATA(CAboutDlg) enum IDD = IDD_ABOUTBOX ; /AFX_DATA / ClassWizard generated virtual function overrides /AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); / DDX/

    4、DDV support /AFX_VIRTUAL/ Implementationprotected: /AFX_MSG(CAboutDlg) /AFX_MSG DECLARE_MESSAGE_MAP();CAboutDlg:CAboutDlg() : CDialog(CAboutDlg:IDD) /AFX_DATA_INIT(CAboutDlg) /AFX_DATA_INITvoid CAboutDlg:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CAboutDlg) /AFX_DA

    5、TA_MAPBEGIN_MESSAGE_MAP(CAboutDlg, CDialog) /AFX_MSG_MAP(CAboutDlg) / No message handlers /AFX_MSG_MAPEND_MESSAGE_MAP()/ CZxyDlg dialogCZxyDlg:CZxyDlg(CWnd* pParent /*=NULL*/) : CDialog(CZxyDlg:IDD, pParent) /AFX_DATA_INIT(CZxyDlg) / NOTE: the ClassWizard will add member initialization here /AFX_DAT

    6、A_INIT / Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()-LoadIcon(IDR_MAINFRAME);void CZxyDlg:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CZxyDlg) DDX_Control(pDX, IDC_BUTTON3, m_button_change); DDX_Control(pDX, IDC_BUTTON

    7、2, m_button_del); DDX_Control(pDX, IDC_BUTTON1, m_button_enter); DDX_Control(pDX, IDC_LIST4, m_list_ctrl); /AFX_DATA_MAPBEGIN_MESSAGE_MAP(CZxyDlg, CDialog) /AFX_MSG_MAP(CZxyDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_BUTTON2, On

    8、Button2) ON_BN_CLICKED(IDC_BUTTON3, OnButton3) /AFX_MSG_MAPEND_MESSAGE_MAP()/ CZxyDlg message handlersBOOL CZxyDlg:OnInitDialog() CDialog:OnInitDialog(); / Add About. menu item to system menu. / IDM_ABOUTBOX must be in the system command range. ASSERT(IDM_ABOUTBOX & 0xFFF0) = IDM_ABOUTBOX); ASSERT(I

    9、DM_ABOUTBOX AppendMenu(MF_SEPARATOR); pSysMenu-AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); / Set the icon for this dialog. The framework does this automatically / when the applications main window is not a dialog SetIcon(m_hIcon, TRUE); / Set big icon SetIcon(m_hIcon, FALSE); / Set small icon

    10、 / TODO: Add extra initialization here m_list_ctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT); CRect rect; m_list_ctrl.GetClientRect(&rect); int nColInterval=rect.Width()/16; m_list_ctrl.InsertColumn(0,_T(学号),LVCFMT_LEFT,nColInterval*3); m_list_ctrl.InsertColumn(1,_T(姓名),LVCFMT_LEFT,nColInterval*2); m_l

    11、ist_ctrl.InsertColumn(2,_T(性别),LVCFMT_CENTER,nColInterval*1+5); m_list_ctrl.InsertColumn(3,_T(班级),LVCFMT_LEFT,nColInterval*2); m_list_ctrl.InsertColumn(4,_T(出生日期),LVCFMT_LEFT,nColInterval*3); m_list_ctrl.InsertColumn(5,_T(电话号码),LVCFMT_LEFT,nColInterval*3); m_list_ctrl.InsertColumn(6,_T(已获学分),LVCFMT_

    12、LEFT,nColInterval*2); return TRUE; / return TRUE unless you set the focus to a controlvoid CZxyDlg:OnSysCommand(UINT nID, LPARAM lParam) if (nID & 0xFFF0) = IDM_ABOUTBOX) CAboutDlg dlgAbout; dlgAbout.DoModal(); else CDialog:OnSysCommand(nID, lParam); / If you add a minimize button to your dialog, yo

    13、u will need the code below/ to draw the icon. For MFC applications using the document/view model,/ this is automatically done for you by the framework.void CZxyDlg:OnPaint() if (IsIconic() CPaintDC dc(this); / device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); /

    14、 Center icon in client rectangle 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; / Draw the icon dc.DrawIcon(x, y, m_hIcon); else CDialog:OnPaint()

    15、; / The system calls this to obtain the cursor to display while the user drags/ the minimized window.HCURSOR CZxyDlg:OnQueryDragIcon() return (HCURSOR) m_hIcon;#include MyDialog_enter.hvoid CZxyDlg:OnButton1() / TODO: Add your control notification handler code here CMyDialog_enter *pwd=new CMyDialog

    16、_enter(this); pwd-Create(IDD_DIALOG1,this); pwd-ShowWindow(1);#include student.hvoid CZxyDlg:List_Show(void) m_list_ctrl.DeleteAllItems(); int nItem = m_list_ctrl.GetItemCount(); for (int i=0;ipeople0.AllNumber|i=people0.AllNumber;i+,nItem+) m_list_ctrl.InsertItem(nItem, peoplei.sno); m_list_ctrl.Se

    17、tItemText(nItem, 1,peoplei.sname); m_list_ctrl.SetItemText(nItem, 2,peoplei.sex); m_list_ctrl.SetItemText(nItem, 3,peoplei.inst); m_list_ctrl.SetItemText(nItem, 4,peoplei.brondata); m_list_ctrl.SetItemText(nItem, 5,peoplei.phone); m_list_ctrl.SetItemText(nItem, 6,peoplei.grade); void CZxyDlg:OnButto

    18、n2() / TODO: Add your control notification handler code here int nItem=m_list_ctrl.GetSelectionMark(); /AfxMessageBox(peoplenItem.sname,MB_OK); if (nItem=-1) AfxMessageBox(您未选择任何内容!,MB_OK); else if (AfxMessageBox(确认删除学生+peoplenItem.sname+的信息?,MB_YESNO)=IDYES) for (;nItemCreate(IDD_DIALOG2,this); pwn

    19、d-ShowWindow(1);BOOL CZxyDlg:PreTranslateMessage(MSG* pMsg) /屏蔽回车和ESC按键 / TODO: 在此添加专用代码和/或调用基类 / 屏蔽 回车和ESC 键 / 屏蔽ESC 键退出 if (pMsg-message = WM_KEYDOWN & pMsg-wParam = 0x1b) return TRUE; / 回车 if (pMsg-message = WM_KEYDOWN & pMsg-wParam = 0x0d ) return TRUE; return CDialog:PreTranslateMessage(pMsg);遇到的问题及解决方法(编译错误提示及如何解决)1、主要遇到了一些成员变量添加错误的问题,在通过Ctrl+W操作显示窗口中重新添加后得以改正,是缺少成员变量的问题。2、还有做作业的过程中多次遇到缺少定义的现象,在同学的帮助下找到并添加改正。3、在执行时出现“计算机中缺少.DLL文件,无法运行”的问题在工程的常规中在了连接方式后运行。


    注意事项

    本文(VC大作业分析报告学生信息管理系统.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开