📄 scoredlg.cpp
字号:
// ScoreDlg.cpp : implementation file
//
#include "stdafx.h"
#include "SIMS.h"
#include "ScoreDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CScoreDlg dialog
CScoreDlg::CScoreDlg(CWnd* pParent /*=NULL*/)
: CDialog(CScoreDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CScoreDlg)
m_arts = 0;
m_chemistry = 0;
m_chinese = 0;
m_computer = 0;
m_english = 0;
m_geography = 0;
m_history = 0;
m_math = 0;
m_music = 0;
m_organism = 0;
m_phisicis = 0;
m_politics = 0;
m_sports = 0;
m_unknown1 = 0;
m_unknown2 = 0;
//}}AFX_DATA_INIT
}
void CScoreDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CScoreDlg)
DDX_Text(pDX, IDC_ARTS, m_arts);
DDX_Text(pDX, IDC_CHEMISTRY, m_chemistry);
DDX_Text(pDX, IDC_CHINESE, m_chinese);
DDX_Text(pDX, IDC_COMPUTER, m_computer);
DDX_Text(pDX, IDC_ENGLISH, m_english);
DDX_Text(pDX, IDC_GEOGRAPHY, m_geography);
DDX_Text(pDX, IDC_HISTORY, m_history);
DDX_Text(pDX, IDC_MATH, m_math);
DDX_Text(pDX, IDC_MUSIC, m_music);
DDX_Text(pDX, IDC_ORGANISM, m_organism);
DDX_Text(pDX, IDC_PHISICIS, m_phisicis);
DDX_Text(pDX, IDC_POLITICS, m_politics);
DDX_Text(pDX, IDC_SPORTS, m_sports);
DDX_Text(pDX, IDC_UNKNOWN1, m_unknown1);
DDX_Text(pDX, IDC_UNKNOWN2, m_unknown2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CScoreDlg, CDialog)
//{{AFX_MSG_MAP(CScoreDlg)
ON_WM_CTLCOLOR()
ON_BN_CLICKED(IDRESET, OnReset)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CScoreDlg message handlers
HBRUSH CScoreDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
pDC->SetBkMode(TRANSPARENT);
return m_brush;
}
BOOL CScoreDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
LOGFONT LogFont;
GetFont()->GetLogFont(&LogFont);
LogFont.lfHeight+=LogFont.lfHeight/4;
LogFont.lfWidth+=LogFont.lfWidth/4;
m_font.CreateFontIndirect(&LogFont);
GetDlgItem(IDC_STATIC_HEAD)->SetFont(&m_font);
GetDlgItem(IDC_STATIC_HEAD)->SetWindowText(m_name);
m_brush.CreateSolidBrush(RGB(74,142,184));
if(m_bMode) SetWindowText("添加成绩");
else SetWindowText("修改成绩");
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CScoreDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(true);
CDialog::OnOK();
}
void CScoreDlg::OnReset()
{
// TODO: Add your control notification handler code here
UpdateData(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -