-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkecheng.cpp
More file actions
executable file
·109 lines (87 loc) · 2.07 KB
/
kecheng.cpp
File metadata and controls
executable file
·109 lines (87 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// kecheng.cpp : implementation file
//
#include "stdafx.h"
#include "xitong.h"
#include "kecheng.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Ckecheng dialog
Ckecheng::Ckecheng(CWnd* pParent /*=NULL*/)
: CDialog(Ckecheng::IDD, pParent)
{
//{{AFX_DATA_INIT(Ckecheng)
m_edit1 = _T("");
//}}AFX_DATA_INIT
}
void Ckecheng::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Ckecheng)
DDX_Control(pDX, IDC_LIST2, m_List);
DDX_Control(pDX, IDC_COMBO1, m_combo);
DDX_Text(pDX, IDC_EDIT1, m_edit1);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Ckecheng, CDialog)
//{{AFX_MSG_MAP(Ckecheng)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Ckecheng message handlers
void Ckecheng::OnButton1()
{
// TODO: Add your control notification handler code here
pos=m_combo.GetCurSel();
if(pos==0)
{
m_List.ResetContent();
m_List.AddString("高等数学选课名单:");
m_List.AddString("廖月");
m_List.AddString("张三");
m_List.AddString("李四");
m_List.AddString("王五");
m_List.AddString("王八");
m_List.AddString("孙六");
m_List.AddString("刘七");
}
else if(pos==1)
{
m_List.ResetContent();
m_List.AddString("大学英语选课名单:");
m_List.AddString("廖月");
m_List.AddString("王八");
m_List.AddString("李四");
m_List.AddString("孙六");
}
else if(pos==2)
{
m_List.ResetContent();
m_List.AddString("大学物理选课名单:");
m_List.AddString("刘七");
m_List.AddString("孙六");
m_List.AddString("张三");
m_List.AddString("王五");
m_List.AddString("王八");
}
else
{
m_List.ResetContent();
m_List.AddString("体育课选课名单:");
m_List.AddString("廖月");
m_List.AddString("王八");
m_List.AddString("张三");
m_List.AddString("王五");
m_List.AddString("李四");
}
}
void Ckecheng::OnButton2()
{
UpdateData(TRUE);
m_List.AddString(m_edit1);
}