📄 mainwindow.cpp
字号:
// MainWindow.cpp : implementation file
//
#include "stdafx.h"
#include "教学管理系统.h"
#include "MainWindow.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// MainWindow dialog
MainWindow::MainWindow(CWnd* pParent /*=NULL*/)
: CDialog(MainWindow::IDD, pParent)
{
//{{AFX_DATA_INIT(MainWindow)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void MainWindow::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(MainWindow)
DDX_Control(pDX, IDCANCEL, m_cancel);
DDX_Control(pDX, IDC_BUTTON_TOTAL, m_total);
DDX_Control(pDX, IDC_BUTTON_TEAMANA, m_teaMana);
DDX_Control(pDX, IDC_BUTTON_TEAINFO, m_teaInfo);
DDX_Control(pDX, IDC_BUTTON_SCOREMA, m_scoreMa);
DDX_Control(pDX, IDC_BUTTON_DEPTINFO, m_deptInfo);
DDX_Control(pDX, IDC_BUTTON_CSMANA, m_csMana);
DDX_Control(pDX, IDC_BUTTON_COUINFO, m_couInfo);
DDX_Control(pDX, IDC_BUTTON_STUINFO, m_stuInfo);
//}}AFX_DATA_MAP
}
BOOL MainWindow::OnInitDialog()
{
CDialog::OnInitDialog();
m_stuInfo.LoadBitmaps(IDB_BITMAP1, IDB_BITMAP2,IDB_BITMAP1,IDB_BITMAP2);
m_stuInfo.Invalidate(true);
m_stuInfo.SizeToContent();
m_deptInfo.LoadBitmaps(IDB_BITMAP3, IDB_BITMAP4,IDB_BITMAP3,IDB_BITMAP4);
m_deptInfo.Invalidate(true);
m_deptInfo.SizeToContent();
m_couInfo.LoadBitmaps(IDB_BITMAP5, IDB_BITMAP6,IDB_BITMAP5,IDB_BITMAP6);
m_couInfo.Invalidate(true);
m_couInfo.SizeToContent();
m_csMana.LoadBitmaps(IDB_BITMAP7, IDB_BITMAP10,IDB_BITMAP7,IDB_BITMAP10);
m_csMana.Invalidate(true);
m_csMana.SizeToContent();
m_teaInfo.LoadBitmaps(IDB_BITMAP9, IDB_BITMAP8,IDB_BITMAP9,IDB_BITMAP8);
m_teaInfo.Invalidate(true);
m_teaInfo.SizeToContent();
m_teaMana.LoadBitmaps(IDB_BITMAP11, IDB_BITMAP12,IDB_BITMAP11,IDB_BITMAP12);
m_teaMana.Invalidate(true);
m_teaMana.SizeToContent();
m_scoreMa.LoadBitmaps(IDB_BITMAP13, IDB_BITMAP14,IDB_BITMAP13,IDB_BITMAP14);
m_scoreMa.Invalidate(true);
m_scoreMa.SizeToContent();
m_total.LoadBitmaps(IDB_BITMAP15, IDB_BITMAP16,IDB_BITMAP15,IDB_BITMAP16);
m_total.Invalidate(true);
m_total.SizeToContent();
m_cancel.LoadBitmaps(IDB_BITMAP17, IDB_BITMAP18,IDB_BITMAP17,IDB_BITMAP18);
m_cancel.Invalidate(true);
m_cancel.SizeToContent();
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
BEGIN_MESSAGE_MAP(MainWindow, CDialog)
//{{AFX_MSG_MAP(MainWindow)
ON_BN_CLICKED(IDC_BUTTON_STUINFO, OnButtonStuinfo)
ON_BN_CLICKED(IDC_BUTTON_DEPTINFO, OnButtonDeptinfo)
ON_BN_CLICKED(IDC_BUTTON_COUINFO, OnButtonCouinfo)
ON_BN_CLICKED(IDC_BUTTON_TEAINFO, OnButtonTeainfo)
ON_BN_CLICKED(IDC_BUTTON_CSMANA, OnButtonCsmana)
ON_BN_CLICKED(IDC_BUTTON_SCOREMA, OnButtonScorema)
ON_BN_CLICKED(IDC_BUTTON_TEAMANA, OnButtonTeamana)
ON_BN_CLICKED(IDC_BUTTON_TOTAL, OnButtonTotal)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// MainWindow message handlers
void MainWindow::OnCancel()
{
// TODO: Add extra cleanup here
if(AfxMessageBox("确实要离开吗?",MB_YESNO) == IDYES)
CDialog::OnCancel();
}
void MainWindow::OnButtonStuinfo()
{
// TODO: Add your control notification handler code here
StuDlg.DoModal();
}
void MainWindow::OnButtonDeptinfo()
{
// TODO: Add your control notification handler code here
SdeDlg.DoModal();
}
void MainWindow::OnButtonCouinfo()
{
// TODO: Add your control notification handler code here
CouDlg.DoModal();
}
void MainWindow::OnButtonTeainfo()
{
// TODO: Add your control notification handler code here
TeaDlg.DoModal();
}
void MainWindow::OnButtonCsmana()
{
// TODO: Add your control notification handler code here
SelDlg.DoModal();
}
void MainWindow::OnButtonScorema()
{
// TODO: Add your control notification handler code here
GraDlg.DoModal();
}
void MainWindow::OnButtonTeamana()
{
// TODO: Add your control notification handler code here
TeaCouDlg.DoModal();
}
void MainWindow::OnButtonTotal()
{
// TODO: Add your control notification handler code here
StaDlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -