// EditDlg.cpp : implementation file
//

#include "stdafx.h"
#include "dlgdata_mfc.h"
#include "person.h"
#include "EditDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEditDlg dialog


CEditDlg::CEditDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CEditDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CEditDlg)
	m_Age = 0;
	m_Eligible = FALSE;
	m_Name = _T("");
	//}}AFX_DATA_INIT
	m_Person = 0;
}


void CEditDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CEditDlg)
	DDX_Text(pDX, IDC_AGE, m_Age);
	DDX_Check(pDX, IDC_ELIGIBLE, m_Eligible);
	DDX_Text(pDX, IDC_NAME, m_Name);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CEditDlg message handlers

BOOL CEditDlg::OnInitDialog() 
{
	// Initialize members.  Note: Before call to base InitDialog
//	m_Age = m_Person->Age;
//	m_Eligible = m_Person->Eligible?TRUE:FALSE;
//	m_Name = m_Person->Name;

	CDialog::OnInitDialog();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CEditDlg::OnOK() 
{
	CDialog::OnOK();
//	strcpy( m_Person->Name, m_Name );
//	m_Person->Eligible = m_Eligible?true:false;
//	m_Person->Age = m_Age;
}
