// DlgMailTest.cpp : implementation file
//

#include "stdafx.h"
#include "netviewx.h"
#include "DlgMailTest.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDlgMailTest dialog


CDlgMailTest::CDlgMailTest(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgMailTest::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgMailTest)
	m_strshow = _T("");
	//}}AFX_DATA_INIT
}


void CDlgMailTest::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgMailTest)
	DDX_Text(pDX, IDC_EDIT_STR, m_strshow);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgMailTest, CDialog)
	//{{AFX_MSG_MAP(CDlgMailTest)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgMailTest message handlers
BOOL CDlgMailTest::OnInitDialog() 
{
    CDialog::OnInitDialog();
    
    // TODO: Add extra initialization here
    GetWindowText(m_windowText);
    
    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgMailTest::SetShowText(BOOL bSuccess, char *strshow)
{
    CString strtmp;
    m_strshow = strshow;
    UpdateData(FALSE);
    if (bSuccess)
    {
        strtmp.LoadString(IDS_STRING202);
    } 
    else
    {
        strtmp.LoadString(IDS_STRING203);
    }
    SetWindowText(strtmp);
}

void CDlgMailTest::OnClose() 
{
    // TODO: Add your message handler code here and/or call default
    ShowWindow(SW_HIDE);
    m_strshow.Empty();
    UpdateData(FALSE);
    SetWindowText(m_windowText);
}

void CDlgMailTest::OnOK() 
{
    // TODO: Add extra validation here
    ShowWindow(SW_HIDE);
    m_strshow.Empty();
    UpdateData(FALSE);
    SetWindowText(m_windowText);
}