rundlg.cpp

来自「BP神经网络程序」· C++ 代码 · 共 77 行

CPP
77
字号
// RunDlg.cpp : implementation file
//

#include "stdafx.h"
#include "bpnlayerexe.h"
#include "RunDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CRunDlg dialog


CRunDlg::CRunDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CRunDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CRunDlg)
	m_iStudyStyle = 0;
	m_iStudyTimth = 0;
	m_iRepeatTimth = 0;
	m_dPrecision = 0.0;
	//}}AFX_DATA_INIT


}


void CRunDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRunDlg)
	DDX_Radio(pDX, IDC_RADIO1, m_iStudyStyle);
	DDX_Text(pDX, IDC_EDIT1, m_iStudyTimth);
	DDX_Text(pDX, IDC_EDIT3, m_iRepeatTimth);
	DDX_Text(pDX, IDC_EDIT2, m_dPrecision);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRunDlg, CDialog)
	//{{AFX_MSG_MAP(CRunDlg)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRunDlg message handlers

void CRunDlg::OnButton1() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	this->EndDialog(0);
}

void CRunDlg::OnRadio1() 
{
	// TODO: Add your control notification handler code here
	GetDlgItem(IDC_EDIT1)->EnableWindow(TRUE);
	GetDlgItem(IDC_EDIT2)->EnableWindow(FALSE);
	GetDlgItem(IDC_EDIT3)->EnableWindow(FALSE);
}

void CRunDlg::OnRadio2() 
{
	// TODO: Add your control notification handler code here
	GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE);
	GetDlgItem(IDC_EDIT2)->EnableWindow(TRUE);
	GetDlgItem(IDC_EDIT3)->EnableWindow(TRUE);
}

⌨️ 快捷键说明

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