// NetKeyAdd.cpp : implementation file // #include "stdafx.h" #include "netapp.h" #include "NetKeyAdd.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CNetKeyAdd dialog CNetKeyAdd::CNetKeyAdd(CWnd* pParent /*=NULL*/) : CDialog(CNetKeyAdd::IDD, pParent) { //{{AFX_DATA_INIT(CNetKeyAdd) m_szKey = _T(""); //}}AFX_DATA_INIT } void CNetKeyAdd::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CNetKeyAdd) DDX_Text(pDX, IDC_ADD_DATA, m_szKey); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CNetKeyAdd, CDialog) //{{AFX_MSG_MAP(CNetKeyAdd) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CNetKeyAdd message handlers void CNetKeyAdd::OnOK() { CString szKey; UpdateData(true); GetDlgItemText(IDC_ADD_DATA, szKey); if (_atoi64(szKey) != 0) { CDialog::OnOK(); } else { SetDlgItemText(IDC_ADD_DATA,""); } }