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

📄 errordlg.cpp

📁 多层神经网络范例 http://www.codeproject.com/cpp/MLP.asp?df=100&forumid=148477&exp=0&select=1141594#xx114159
💻 CPP
字号:
// ErrorDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MultiLayerPerceptron.h"
#include "ErrorDlg.h"
#include ".\errordlg.h"


// CErrorDlg dialog

IMPLEMENT_DYNAMIC(CErrorDlg, CDialog)
CErrorDlg::CErrorDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CErrorDlg::IDD, pParent)
{
}

CErrorDlg::~CErrorDlg()
{
}

void CErrorDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_SMARTGRAPH1, m_errorGraph);
}


BEGIN_MESSAGE_MAP(CErrorDlg, CDialog)
	ON_WM_SIZE()
END_MESSAGE_MAP()


// CErrorDlg message handlers

BOOL CErrorDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	m_errorGraph.SetParentWnd(m_hWnd);
	m_errorGraph.put_Title(_T("Error Graph"));
	m_errorGraph.put_xLable(_T("Number of iterations"));
	m_errorGraph.put_yLable(_T("Total RMS error"));
	m_errorGraph.SetData(0,0,0,0);

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

void CErrorDlg::OnSize(UINT nType, int cx, int cy)
{
	CDialog::OnSize(nType, cx, cy);
	RECT rc,rc2;
	GetClientRect(&rc);
	rc.bottom -= 30;
	//if(m_errorGraph.m_hWndOwner)
    m_errorGraph.MoveWindow(&rc);
	rc2.top = rc.bottom; rc2.left = rc.left; rc2.right = rc2.left + 40; rc2.bottom = rc2.top + 30;
	CWnd* pwnd = GetDlgItem(IDOK);
	if(pwnd)
        pwnd->MoveWindow(&rc2);
	m_errorGraph.UpdateGraph();
	Invalidate();
	// TODO: Add your message handler code here
}

⌨️ 快捷键说明

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