資源簡介
MFC實現學生管理系統,C++課程設計,可以實現學生信息添加,查詢,修改,刪除功能
代碼片段和文件信息
//?AddingStuInfo.cpp?:?實現文件
//
#include?“stdafx.h“
#include?“學生管理系統.h“
#include?“AddingStuInfo.h“
#include?“afxdialogex.h“
#include?“學生管理系統Dlg.h“
#include?“linkList.h“
//?CAddingStuInfo?對話框
IMPLEMENT_DYNAMIC(CAddingStuInfo?CDialog)
CAddingStuInfo::CAddingStuInfo(CWnd*?pParent?/*=NULL*/)
:?CDialog(CAddingStuInfo::IDD?pParent)
?boolSex(false)
{
}
CAddingStuInfo::~CAddingStuInfo()
{
}
void?CAddingStuInfo::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX?IDC_EDIT1?m_StrName);
DDX_Control(pDX?IDC_EDIT2?m_StrNumber);
DDX_Control(pDX?IDC_EDIT4?m_DormNumEdit);
DDX_Control(pDX?IDC_COMBO3?m_CollegeCComboBox);
DDX_Control(pDX?IDC_COMBO4?m_MagorCComoboBox);
DDX_Control(pDX?IDC_EDIT5?m_StuIDEdit);
DDX_Control(pDX?IDC_EDIT6?m_AddressEdit);
DDX_Control(pDX?IDC_EDIT3?m_ConnectEdit);
}
BEGIN_MESSAGE_MAP(CAddingStuInfo?CDialog)
ON_BN_CLICKED(IDOK?&CAddingStuInfo::OnAddStuInfo)
ON_BN_CLICKED(IDC_RADIO1?&CAddingStuInfo::OnMenRadioSel)
ON_BN_CLICKED(IDC_RADIO2?&CAddingStuInfo::OnWomenRadioSel)
ON_CBN_SELCHANGE(IDC_COMBO3?&CAddingStuInfo::OnCollegeSelchange)
END_MESSAGE_MAP()
//?CAddingStuInfo?消息處理程序
void?CAddingStuInfo::OnAddStuInfo()
{
Node?*s=new?Node;
m_StrName.GetWindowTextA(s->Name);
m_StrNumber.GetWindowTextA(s->StuNum);
s->sex=boolSex;
m_DormNumEdit.GetWindowTextA(s->DormitoryNum);
m_CollegeCComboBox.GetWindowTextA(s->College);
m_MagorCComoboBox.GetWindowTextA(s->Major);
m_StuIDEdit.GetWindowTextA(s->StuID);
m_AddressEdit.GetWindowTextA(s->StrAddress);
m_ConnectEdit.GetWindowTextA(s->StrConnectNum);
theApp.Student.Insert(s);
MessageBox(“增加學生信息成功!““系統提示!“MB_ICONINFORMATION);
delete?s;
CDialog::OnOK();
}
void?CAddingStuInfo::OnMenRadioSel()
{
boolSex=true;
//?TODO:?在此添加控件通知處理程序代碼
}
void?CAddingStuInfo::OnWomenRadioSel()
{
boolSex=false;
//?TODO:?在此添加控件通知處理程序代碼
}
BOOL?CAddingStuInfo::OnInitDialog()
{
CDialog::OnInitDialog();
m_CollegeCComboBox.InsertString(0“計算機科學與技術學院“);
m_CollegeCComboBox.InsertString(1“數學科學學院“);
m_CollegeCComboBox.InsertString(2“物理與電子電氣工程學院“);
m_CollegeCComboBox.InsertString(3“外國語學院“);
m_CollegeCComboBox.InsertString(4“化學化工學院“);
m_CollegeCComboBox.InsertString(5“文學院“);
m_CollegeCComboBox.InsertString(6“教育科學學院“);
m_CollegeCComboBox.InsertString(7“城市與環境學院“);
m_CollegeCComboBox.InsertString(8“音樂學院“);
m_CollegeCComboBox.InsertString(9“美術學院“);
m_CollegeCComboBox.InsertString(10“體育學院“);
m_CollegeCComboBox.InsertString(11“傳媒學院“);
m_CollegeCComboBox.InsertString(12“政治與公共管理學院“);
m_CollegeCComboBox.InsertString(13“歷史文化旅游學院“);
m_CollegeCComboBox.InsertString(14“法學院“);
m_CollegeCComboBox.InsertString(15“經濟與管理學院“);
m_CollegeCComboBox.InsertString(16“生命科學學院“);
//?TODO:??在此添加額外的初始化
return?TRUE;??//?return?TRUE?unless?you?set?the?focus?to?a?control
//?異常:?OCX?屬性頁應返回?FALSE
}
void?CAddingStuInfo::
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????206848??2012-01-21?17:16??學生管理系統\Debug\學生管理系統.exe
?????文件????1389504??2012-01-21?17:16??學生管理系統\Debug\學生管理系統.ilk
?????文件????5270528??2012-01-21?17:16??學生管理系統\Debug\學生管理系統.pdb
????..A.SH.????????46??2012-01-20?20:37??學生管理系統\desktop.ini
?????文件???????3905??2012-01-20?07:32??學生管理系統\學生管理系統\AddingStuInfo.cpp
?????文件????????786??2012-01-19?13:50??學生管理系統\學生管理系統\AddingStuInfo.h
?????文件???????3234??2012-01-21?17:16??學生管理系統\學生管理系統\AddStuGardeInfo.cpp
?????文件????????804??2012-01-21?16:57??學生管理系統\學生管理系統\AddStuGardeInfo.h
?????文件???????1131??2012-01-21?16:05??學生管理系統\學生管理系統\AddStuGradeNumDlg.cpp
?????文件????????497??2012-01-21?15:07??學生管理系統\學生管理系統\AddStuGradeNumDlg.h
?????文件??????????1??2009-08-31?02:32??學生管理系統\學生管理系統\ClassDiagram1.cd
?????文件??????50142??2012-01-21?16:27??學生管理系統\學生管理系統\Debug\AddingStuInfo.obj
?????文件??????46740??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\AddStuGardeInfo.obj
?????文件??????29909??2012-01-21?16:57??學生管理系統\學生管理系統\Debug\AddStuGradeNumDlg.obj
?????文件??????20790??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\cl.command.1.tlog
?????文件?????129530??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\CL.read.1.tlog
?????文件??????26990??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\CL.write.1.tlog
?????文件??????29174??2012-01-21?16:27??學生管理系統\學生管理系統\Debug\DelStuNumDlg.obj
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
?????文件??????????2??2012-01-21?17:16??學生管理系統\學生管理系統\Debug\li
............此處省略77個文件信息
- 上一篇:C語言程序設計教程(第3版)譚浩強張基溫.pdf
- 下一篇:MFC制作的飛機大戰游戲
評論
共有 條評論