// ConfigError.cpp : implementation file // #include "stdafx.h" #include "autoconfig.h" #include "ConfigError.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CConfigError dialog CConfigError::CConfigError(bool rcon,CWnd* pParent /*=NULL*/) : CDialog(CConfigError::IDD, pParent) { //{{AFX_DATA_INIT(CConfigError) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT retval=0; canreconfig=rcon; } void CConfigError::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CConfigError) DDX_Control(pDX, IDC_RECONFIG, m_reconbut); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CConfigError, CDialog) //{{AFX_MSG_MAP(CConfigError) ON_BN_CLICKED(IDC_EXITGAME, OnExitgame) ON_BN_CLICKED(IDC_RECONFIG, OnReconfig) ON_BN_CLICKED(IDC_RUNGAME, OnRungame) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CConfigError message handlers void CConfigError::OnCancel() { // TODO: Add extra cleanup here // CDialog::OnCancel(); } void CConfigError::OnOK() { // TODO: Add extra validation here // CDialog::OnOK(); } void CConfigError::OnExitgame() { retval=-1; CDialog::OnOK(); } void CConfigError::OnReconfig() { retval=0; CDialog::OnOK(); } void CConfigError::OnRungame() { retval=1; CDialog::OnOK(); } BOOL CConfigError::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here if(!canreconfig) m_reconbut.ShowWindow(SW_HIDE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }