Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
9
Добавлен:
15.06.2014
Размер:
1.17 Кб
Скачать
// page5.cpp : implementation file
//

#include "stdafx.h"
#include "Laboratory works.h"
#include "page5.h"

page5 *cd5;
// page5 dialog

IMPLEMENT_DYNAMIC(page5, CDialog)
page5::page5(CWnd* pParent /*=NULL*/)
	: CDialog(page5::IDD, pParent)
	, x(0)
{
}

page5::~page5()
{
}

void page5::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_LIST1, m_list);
	DDX_Control(pDX, IDC_EDIT1, m_input);
}


BEGIN_MESSAGE_MAP(page5, CDialog)
	ON_BN_CLICKED(IDCANCEL, OnBnClickedCancel)
	ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()


// page5 message handlers

void page5::OnBnClickedCancel()
{
	// TODO: Add your control notification handler code here
	OnCancel();
}

void page5::OnBnClickedButton1()
{
  //x-float in Editbox
	int y[10000000];
	int i,xx;
	char buf[20];
    char tmp[15];
    
	
	m_input.GetWindowText(tmp,15);
		xx = atoi(tmp);
	for (i=0;abs(y[i]-y[i-1])<0.0001;i++){
		y[i]=0.5*(y[i-1]+xx/y[i-1]);}
	itoa(y[i],buf,10); 
	
	//this->
		//itoa(xx,buf,20);
		m_list.AddString(buf);
	// TODO: Add your control notification handler code here
}
Соседние файлы в папке Laboratory works