// ModifyFloat.cpp : implementation file
//

#include "stdafx.h"
#include "animscript.h"
#include "ModifyFloat.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CModifyFloat dialog


CModifyFloat::CModifyFloat(CWnd* pParent /*=NULL*/)
	: CDialog(CModifyFloat::IDD, pParent)
{
	//{{AFX_DATA_INIT(CModifyFloat)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CModifyFloat::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CModifyFloat)
	DDX_Control(pDX, IDC_EDIT_VALUE, m_editValue);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CModifyFloat, CDialog)
	//{{AFX_MSG_MAP(CModifyFloat)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CModifyFloat message handlers

void CModifyFloat::OnOK() 
{
	CString str;
	m_editValue.GetWindowText(str);
	m_pFloatNode->SetValue(str);
	CDialog::OnOK();
}

BOOL CModifyFloat::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_editValue.SetWindowText(m_pFloatNode->GetValue());
	m_editValue.SetFocus();
	m_editValue.SetSel(MAKELONG(0,-1));
	return false;
	//return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
