/***************************************************************************
**
**    $Header:   D:/EP196/SRC/LOG/SRCDLL/SRCPASS.CPP   1.0   15 Aug 1997 14:03:40   ZJRD  $
**
**    $Log:   D:/EP196/SRC/LOG/SRCDLL/SRCPASS.CPP  $
** 
**    Rev 1.0   15 Aug 1997 14:03:40   ZJRD
** Initial revision.
** 
****************************************************************************/

// srcpass.cpp : implementation file
//

#include "stdafx.h"
#include "srcdll.h"
#include "srcpass.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSourceHintsDlg dialog

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

void CSourceHintsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSourceHintsDlg)
	DDX_Text(pDX, IDC_EDIT_SRCHINTS_PASSWORD, m_strPassword);
	//}}AFX_DATA_MAP
}

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

/////////////////////////////////////////////////////////////////////////////
// CSourceHintsDlg message handlers

BOOL CSourceHintsDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	// Center window
	CenterWindow();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSourceHintsDlg::OnOK() 
{
	// TODO: Add extra validation here

	// DDE
	UpdateData();
	
	// Check password
	if ( m_strPassword != "   Chen Jun " ) {
		CDialog::OnCancel();
	}
	else {
		CDialog::OnOK();
	}
}
