Скачиваний:
5
Добавлен:
01.05.2014
Размер:
2.94 Кб
Скачать
// Init.cpp : implementation file
//

#include "stdafx.h"
#include "Laba4.h"
#include "Init.h"
#include ".\init.h"


// Init dialog

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

Init::~Init()
{
}

void Init::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);

	if(theApp.InitF == 1)
	{
		DDX_Text(pDX, IDC_EDIT1, T1X);
		DDX_Text(pDX, IDC_EDIT2, T1Y);
		DDX_Text(pDX, IDC_EDIT3, T1Z);
		DDX_Text(pDX, IDC_EDIT4, T2X);
		DDX_Text(pDX, IDC_EDIT5, T2Y);
		DDX_Text(pDX, IDC_EDIT6, T2Z);
		DDX_Text(pDX, IDC_EDIT7, T3X);
		DDX_Text(pDX, IDC_EDIT8, T3Y);
		DDX_Text(pDX, IDC_EDIT9, T3Z);
		DDX_Text(pDX, IDC_EDIT10, T4X);
		DDX_Text(pDX, IDC_EDIT11, T4Y);
		DDX_Text(pDX, IDC_EDIT12, T4Z);
		DDX_Text(pDX, IDC_EDIT13, T5X);
		DDX_Text(pDX, IDC_EDIT14, T5Y);
		DDX_Text(pDX, IDC_EDIT15, T5Z);
		DDX_Text(pDX, IDC_EDIT16, T6X);
		DDX_Text(pDX, IDC_EDIT17, T6Y);
		DDX_Text(pDX, IDC_EDIT18, T6Z);

		theApp.Pover.P11.X = T1X;
		theApp.Pover.P11.Y = T1Y;
		theApp.Pover.P11.Z = T1Z;
		theApp.Pover.P12.X = T2X;
		theApp.Pover.P12.Y = T2Y;
		theApp.Pover.P12.Z = T2Z;
		theApp.Pover.P13.X = T3X;
		theApp.Pover.P13.Y = T3Y;
		theApp.Pover.P13.Z = T3Z;
		theApp.Pover.P21.X = T4X;
		theApp.Pover.P21.Y = T4Y;
		theApp.Pover.P21.Z = T4Z;
		theApp.Pover.P22.X = T5X;
		theApp.Pover.P22.Y = T5Y;
		theApp.Pover.P22.Z = T5Z;
		theApp.Pover.P23.X = T6X;
		theApp.Pover.P23.Y = T6Y;
		theApp.Pover.P23.Z = T6Z;
	}
	else
		theApp.InitF = 1;
}


BEGIN_MESSAGE_MAP(Init, CDialog)
END_MESSAGE_MAP()


// Init message handlers

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

	SetDlgItemInt(IDC_EDIT1, (UINT)theApp.Pover.P11.X, TRUE);
	SetDlgItemInt(IDC_EDIT2, (UINT)theApp.Pover.P11.Y, TRUE);
	SetDlgItemInt(IDC_EDIT3, (UINT)theApp.Pover.P11.Z, TRUE);
	SetDlgItemInt(IDC_EDIT4, (UINT)theApp.Pover.P12.X, TRUE);
	SetDlgItemInt(IDC_EDIT5, (UINT)theApp.Pover.P12.Y, TRUE);
	SetDlgItemInt(IDC_EDIT6, (UINT)theApp.Pover.P12.Z, TRUE);
	SetDlgItemInt(IDC_EDIT7, (UINT)theApp.Pover.P13.X, TRUE);
	SetDlgItemInt(IDC_EDIT8, (UINT)theApp.Pover.P13.Y, TRUE);
	SetDlgItemInt(IDC_EDIT9, (UINT)theApp.Pover.P13.Z, TRUE);
	SetDlgItemInt(IDC_EDIT10, (UINT)theApp.Pover.P21.X, TRUE);
	SetDlgItemInt(IDC_EDIT11, (UINT)theApp.Pover.P21.Y, TRUE);
	SetDlgItemInt(IDC_EDIT12, (UINT)theApp.Pover.P21.Z, TRUE);
	SetDlgItemInt(IDC_EDIT13, (UINT)theApp.Pover.P22.X, TRUE);
	SetDlgItemInt(IDC_EDIT14, (UINT)theApp.Pover.P22.Y, TRUE);
	SetDlgItemInt(IDC_EDIT15, (UINT)theApp.Pover.P22.Z, TRUE);
	SetDlgItemInt(IDC_EDIT16, (UINT)theApp.Pover.P23.X, TRUE);
	SetDlgItemInt(IDC_EDIT17, (UINT)theApp.Pover.P23.Y, TRUE);
	SetDlgItemInt(IDC_EDIT18, (UINT)theApp.Pover.P23.Z, TRUE);


	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
Соседние файлы в папке Laba4