// ReadOnly.cpp : implementation file
//

#include "stdafx.h"
#include "wgm.h"
#include "ReadOnly.h"

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

/////////////////////////////////////////////////////////////////////////////
// ReadOnlyDialog dialog


ReadOnlyDialog::ReadOnlyDialog(CWnd* pParent /*=NULL*/)
	: CDialog(ReadOnlyDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(ReadOnlyDialog)
	m_fname = _T("");
	//}}AFX_DATA_INIT
     m_answer = 'N';
}


void ReadOnlyDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(ReadOnlyDialog)
	DDX_Text(pDX, IDC_FNAME, m_fname);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(ReadOnlyDialog, CDialog)
	//{{AFX_MSG_MAP(ReadOnlyDialog)
	ON_BN_CLICKED(IDC_DELETEALL, OnDeleteall)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// ReadOnlyDialog message handlers

void ReadOnlyDialog::OnDeleteall() 
{
     m_answer = 'a';
     CDialog::OnOK();
}

void ReadOnlyDialog::OnOK() 
{
     m_answer = 'y';
	CDialog::OnOK();
}

char ReadOnlyDialog::GetAnswer()
{
     DoModal();

     return( m_answer );
}
