// johndlg.cpp : implementation file
//

#include "stdafx.h"
#include "diagno.h"
#include "static.h"
#include "johndlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CJohnDlg dialog


CJohnDlg::CJohnDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CJohnDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CJohnDlg)
	m_strJohn = "";
	//}}AFX_DATA_INIT
}

void CJohnDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CJohnDlg)
	DDX_Control(pDX, IDC_STATIC_JOHN, m_staticJohn);
	DDX_Text(pDX, IDC_STATIC_JOHN, m_strJohn);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CJohnDlg, CDialog)
	//{{AFX_MSG_MAP(CJohnDlg)
	ON_BN_CLICKED(IDOK, OnOk)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CJohnDlg message handlers

BOOL CJohnDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
//	VERIFY(m_static.SubclassDlgItem(IDC_STATIC_JOHN, this));
//	VERIFY(m_staticJohn.SubclassDlgItem(IDC_STATIC_JOHN, this));	m_strJohn = "DDX string";

	m_strJohn = "John";	

	UpdateData(FALSE);
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CJohnDlg::OnOk()
{
	// TODO: Add your control notification handler code here

	m_strJohn = "Chen";
	
	UpdateData();
	
	//m_staticJohn.SetWindowText(m_strJohn);

}
