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

📄 statisticdlg.cpp

📁 my-project-VC++学生信息系统
💻 CPP
字号:
// StatisticDlg.cpp : implementation file
//

#include "stdafx.h"
#include "S2009072032.h"
#include "StatisticDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CStatisticDlg dialog


CStatisticDlg::CStatisticDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CStatisticDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CStatisticDlg)
	m_statistic = _T("");
	//}}AFX_DATA_INIT
}


void CStatisticDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CStatisticDlg)
	DDX_Text(pDX, IDC_EDIT_STATISTIC, m_statistic);
	DDV_MaxChars(pDX, m_statistic, 10);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CStatisticDlg, CDialog)
	//{{AFX_MSG_MAP(CStatisticDlg)
	ON_BN_CLICKED(IDC_RADIO_REC, OnRadioRec)
	ON_BN_CLICKED(IDC_RADIO_ARC, OnRadioArc)
	ON_EN_CHANGE(IDC_EDIT_STATISTIC, OnChangeEditStatistic)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStatisticDlg message handlers

BOOL CStatisticDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_strOKText.TrimLeft();
	GetDlgItem(IDOK)->SetWindowText(m_strOKText);
	CheckRadioButton(IDC_RADIO_REC, IDC_RADIO_ARC, IDC_RADIO_REC);
	this->m_graphtype=0;

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CStatisticDlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();
	m_statistic.TrimLeft();
	if(m_statistic.IsEmpty())
		MessageBox("统计条件不能为空!");
	else
		CDialog::OnOK();
}

void CStatisticDlg::OnRadioRec() 
{
	// TODO: Add your control notification handler code here
	m_graphtype=0;      //"直方图";
}

void CStatisticDlg::OnRadioArc() 
{
	// TODO: Add your control notification handler code here
	m_graphtype=1;       //"圆饼图";
}

void CStatisticDlg::OnChangeEditStatistic() 
{
	// 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
	
}    

⌨️ 快捷键说明

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