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

📄 scoredlg.cpp

📁 This is Visual C++ basis operation. Using that you can fast go in study.
💻 CPP
字号:
// ScoreDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Exam6_1.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_score2 = 0;
	m_score3 = 0;
	m_score4 = 0;
	m_score5 = 0;
	m_score1 = 0;
	//}}AFX_DATA_INIT
}


void CScoreDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CScoreDlg)
	DDX_Control(pDX, IDOK, m_OK);
	DDX_Control(pDX, IDC_SCORE5, m_Score5Edit);
	DDX_Control(pDX, IDC_SCORE4, m_Score4Edit);
	DDX_Control(pDX, IDC_SCORE3, m_Score3Edit);
	DDX_Control(pDX, IDC_SCORE2, m_Score2Edit);
	DDX_Control(pDX, IDC_SCORE1, m_Score1Edit);
	DDX_Text(pDX, IDC_SCORE2, m_score2);
	DDX_Text(pDX, IDC_SCORE3, m_score3);
	DDX_Text(pDX, IDC_SCORE4, m_score4);
	DDX_Text(pDX, IDC_SCORE5, m_score5);
	DDX_Text(pDX, IDC_SCORE1, m_score1);
	DDV_MinMaxInt(pDX, m_score1, 0, 100);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CScoreDlg, CDialog)
	//{{AFX_MSG_MAP(CScoreDlg)
	ON_EN_CHANGE(IDC_SCORE1, OnChangeScore1)
	ON_EN_CHANGE(IDC_SCORE2, OnChangeScore2)
	ON_EN_CHANGE(IDC_SCORE3, OnChangeScore3)
	ON_EN_CHANGE(IDC_SCORE4, OnChangeScore4)
	ON_EN_CHANGE(IDC_SCORE5, OnChangeScore5)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CScoreDlg message handlers

BOOL CScoreDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
  	m_OK.EnableWindow (false); //禁止“确定”按钮使用,灰色显示
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CScoreDlg::OnChangeScore1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	m_OK.EnableWindow (true);
	
}

void CScoreDlg::OnChangeScore2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	m_OK.EnableWindow (true);

	
}

void CScoreDlg::OnChangeScore3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	m_OK.EnableWindow (true);
	
}

void CScoreDlg::OnChangeScore4() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	m_OK.EnableWindow (true);
	
}

void CScoreDlg::OnChangeScore5() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	m_OK.EnableWindow (true);
	
}

⌨️ 快捷键说明

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