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

#include "stdafx.h"
#include "Laboratory works.h"
#include "page1.h"
#include "math.h"

/* Мой код---------------------------*/
page1 *cd;
/* Мой код---------------------------*/

// page1 dialog

IMPLEMENT_DYNAMIC(page1, CDialog)
page1::page1(CWnd* pParent /*=NULL*/)
	: CDialog(page1::IDD, pParent)
	, ed(0)
	, edd(0)
	, m_ed1(0)
	, ee(0)
{//theApp.m_hnomodal=NULL;
}

page1::~page1()
{
}

void page1::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//theApp.m_hnomodal=NULL;
	DDX_Text(pDX, IDC_EDIT1, ee);
	DDV_MinMaxInt(pDX, ee, 0, 10000);
}


BEGIN_MESSAGE_MAP(page1, CDialog)
	ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
	ON_EN_CHANGE(IDC_EDIT1, OnEnChangeEdit1)
END_MESSAGE_MAP()


// page1 message handlers

void page1::OnBnClickedButton1()
{
UpdateData(TRUE); 
char str[100];
//ee-Value,int, (check-control)
ee=4*(sqrt(ee));
itoa(ee,str,10);

MessageBox(str, "Perimetr", MB_OK);

	// TODO: Add your control notification handler code here
}

void page1::OnEnChangeEdit1()
{
	UpdateData(TRUE); 
	// TODO:  If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.

	// TODO:  Add your control notification handler code here
}
Соседние файлы в папке Laboratory works