⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newcourse.cpp

📁 考试管理系统
💻 CPP
字号:
// NewCourse.cpp : implementation file
//

#include "stdafx.h"
#include "Exam.h"
#include "NewCourse.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CNewCourse dialog


CNewCourse::CNewCourse(CWnd* pParent /*=NULL*/)
	: CDialog(CNewCourse::IDD, pParent)
{
	//{{AFX_DATA_INIT(CNewCourse)
	m_sBook = _T("");
	m_nMust = 0;
	m_sName = _T("");
	m_nPeriod = 0;
	//}}AFX_DATA_INIT
	m_nTeacherNum = 0;
}


void CNewCourse::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNewCourse)
	DDX_Control(pDX, IDC_TEACHER, m_ctrlTeacher);
	DDX_Text(pDX, IDC_BOOK, m_sBook);
	DDX_Radio(pDX, IDC_MUST, m_nMust);
	DDX_Text(pDX, IDC_NAME, m_sName);
	DDX_Text(pDX, IDC_PERIOD, m_nPeriod);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CNewCourse, CDialog)
	//{{AFX_MSG_MAP(CNewCourse)
	ON_CBN_SELCHANGE(IDC_TEACHER, OnSelchangeTeacher)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewCourse message handlers

BOOL CNewCourse::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	for (int i = 0; i < m_nTeacherNum; i++)
		m_ctrlTeacher.AddString(m_sTeacher[i]);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CNewCourse::OnSelchangeTeacher() 
{
	// 得到选中的教师姓名
	m_ctrlTeacher.GetLBText(m_ctrlTeacher.GetCurSel(), m_sTeacher[0]);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -