www.pudn.com > Winmine.zip > WinDlg.cpp


// WinDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "WinMine.h" 
#include "WinDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CWinDlg dialog 
 
 
CWinDlg::CWinDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CWinDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CWinDlg) 
	m_strName = _T(""); 
	//}}AFX_DATA_INIT 
} 
 
 
void CWinDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CWinDlg) 
	DDX_Text(pDX, IDC_NAME, m_strName); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CWinDlg, CDialog) 
	//{{AFX_MSG_MAP(CWinDlg) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CWinDlg message handlers 
 
BOOL CWinDlg::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	 
	CString str; 
	switch( m_level ) 
	{ 
	case 0: 
		str.LoadString( IDS_BASIC ); 
		break; 
	case 1: 
		str.LoadString( IDS_INTERMEDIATE ); 
		break; 
	case 2: 
		str.LoadString( IDS_EXPERT ); 
		break; 
	} 
	SetDlgItemText( IDC_INFO, str ); 
	 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
}