Click here to Skip to main content
11,570,462 members (53,884 online)
Click here to Skip to main content
Add your own
alternative version

Neural Network Classifier

, 29 Jan 2005 CPOL 108.3K 6.2K 75
A Multilayer perceptron used to classify blue and red points.
// 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
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Hossein Khosravi
Software Developer (Senior) FarsiOCR.ir
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
Currently I'm working at Dept. of Electrical Engineering in University of Shahrood.
Pattern Recognition (specially OCR), Neural Networks, Image Processing and Machine Vision are my interests. However I'm a PROGRAMMER as well.
BSc: Sharif University of technology @ 2002
MSc. and PhD: Tarbiat Modarres University @ 2006 & 2010 respectively

Personal Blog: Andisheh Online

Religious Blogs: Shia Muslims , Ashura , Islamic Quotes

Commercial Site: Farsi OCR

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150624.2 | Last Updated 30 Jan 2005
Article Copyright 2005 by Hossein Khosravi
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid