📄 bpnet_basic_info.cpp
字号:
// bpnet_basic_info.cpp : implementation file
//
#include "stdafx.h"
#include "richtest.h"
#include "bpnet_basic_info.h"
#include "bp_net.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// bpnet_basic_info dialog
bpnet_basic_info::bpnet_basic_info(bp_net* pbnet,CWnd* pParent /*=NULL*/)
: CDialog(bpnet_basic_info::IDD, pParent)
{
//{{AFX_DATA_INIT(bpnet_basic_info)
// NOTE: the ClassWizard will add member initialization here
this->pbnet=pbnet;
//}}AFX_DATA_INIT
}
void bpnet_basic_info::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(bpnet_basic_info)
// NOTE: the ClassWizard will add DDX and DDV calls here
DDX_Text(pDX,IDC_EDIT1,pbnet->stderror);
DDX_Text(pDX,IDC_EDIT2,pbnet->alpha);
DDX_Text(pDX,IDC_EDIT3,pbnet->beta);
DDX_Text(pDX,IDC_EDIT4,pbnet->loopcnt);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(bpnet_basic_info, CDialog)
//{{AFX_MSG_MAP(bpnet_basic_info)
// NOTE: the ClassWizard will add message map macros here
ON_CBN_SELCHANGE(IDC_COMBO_FUNC, OnSelchangeComboFunc)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// bpnet_basic_info message handlers
BOOL bpnet_basic_info::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
cmbfunctype=(CComboBox*)GetDlgItem(IDC_COMBO_FUNC);
cmbfunctype->InsertString(0,"分类器");
cmbfunctype->InsertString(1,"拟合器");
//cmbfunctype->InsertString(2,"slope");
//cmbfunctype->InsertString(3,"bar-slope");
cmbfunctype->SetCurSel(pbnet->func_type);
//image->DeleteObject();
//image->LoadBitmap(IDR_DRAW_BAR);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void bpnet_basic_info::OnSelchangeComboFunc()
{
// TODO: Add your control notification handler code here
CComboBox* pcbx=(CComboBox*)this->GetDlgItem(IDC_COMBO_FUNC);
int nIndex=pcbx->GetCurSel();
if(nIndex!=LB_ERR)
{
switch(nIndex)
{
case 0:
pbnet->func_type=declare;
break;
case 1:
pbnet->func_type=simulate;
break;
default:
pbnet->func_type=declare;
break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -