📄 studentwindow.cpp
字号:
// StudentWindow.cpp : implementation file
//
#include "stdafx.h"
#include "教学管理系统.h"
#include "StudentWindow.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// StudentWindow dialog
StudentWindow::StudentWindow(CWnd* pParent /*=NULL*/)
: CDialog(StudentWindow::IDD, pParent)
{
//{{AFX_DATA_INIT(StudentWindow)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void StudentWindow::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(StudentWindow)
DDX_Control(pDX, IDCANCEL, m_cancel);
DDX_Control(pDX, IDC_BUTTON_COURSE, m_course);
DDX_Control(pDX, IDC_BUTTON_SCORE, m_score);
DDX_Control(pDX, IDC_BUTTON_STUINFO, m_stuInfo);
//}}AFX_DATA_MAP
}
BOOL StudentWindow::OnInitDialog()
{
CDialog::OnInitDialog();
m_stuInfo.LoadBitmaps(IDB_BITMAP26, IDB_BITMAP27,IDB_BITMAP26,IDB_BITMAP27);
m_stuInfo.Invalidate(true);
m_stuInfo.SizeToContent();
m_course.LoadBitmaps(IDB_BITMAP20, IDB_BITMAP21,IDB_BITMAP20,IDB_BITMAP21);
m_course.Invalidate(true);
m_course.SizeToContent();
m_score.LoadBitmaps(IDB_BITMAP22, IDB_BITMAP23,IDB_BITMAP22,IDB_BITMAP23);
m_score.Invalidate(true);
m_score.SizeToContent();
m_cancel.LoadBitmaps(IDB_BITMAP24, IDB_BITMAP25,IDB_BITMAP24,IDB_BITMAP25);
m_cancel.Invalidate(true);
m_cancel.SizeToContent();
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
BEGIN_MESSAGE_MAP(StudentWindow, CDialog)
//{{AFX_MSG_MAP(StudentWindow)
ON_BN_CLICKED(IDC_BUTTON_STUINFO, OnButtonStuinfo)
ON_BN_CLICKED(IDC_BUTTON_COURSE, OnButtonCourse)
ON_BN_CLICKED(IDC_BUTTON_SCORE, OnButtonScore)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// StudentWindow message handlers
void StudentWindow::OnButtonStuinfo()
{
// TODO: Add your control notification handler code here
InforDlg.number=ID;
InforDlg.DoModal();
}
void StudentWindow::OnButtonCourse()
{
// TODO: Add your control notification handler code here
CouDlg.ID=ID;
CouDlg.DoModal();
}
void StudentWindow::OnButtonScore()
{
// TODO: Add your control notification handler code here
GraDlg.ID=ID;
GraDlg.DoModal();
}
void StudentWindow::OnCancel()
{
// TODO: Add extra cleanup here
if(AfxMessageBox("确实要离开吗?",MB_YESNO) == IDYES)
CDialog::OnCancel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -