// acwidths.cpp : implementation file
//

#include "stdafx.h"
#include "fontedit.h"
#include "acwidths.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// ACWidths dialog


ACWidths::ACWidths(CWnd* pParent /*=NULL*/)
	: CDialog(ACWidths::IDD, pParent)
{
	//{{AFX_DATA_INIT(ACWidths)
	m_AWidth = _T("");
	m_CWidth = _T("");
	//}}AFX_DATA_INIT
}


void ACWidths::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(ACWidths)
	DDX_Text(pDX, IDC_AWIDTH, m_AWidth);
	DDX_Text(pDX, IDC_CWIDTH, m_CWidth);
	//}}AFX_DATA_MAP
}


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


/////////////////////////////////////////////////////////////////////////////
// ACWidths message handlers

void ACWidths::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	nAWidth = atoi(m_AWidth);
	nCWidth = atoi(m_CWidth);
	CDialog::OnOK();
}

void ACWidths::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

BOOL ACWidths::OnInitDialog() 
{
	CDialog::OnInitDialog();
	m_AWidth.Format("%d",nAWidth);
	m_CWidth.Format("%d",nCWidth);
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
