www.pudn.com > SmartCardSrc.zip > DlgSetup.cpp
//------------------------------------------------------------------------------ // // Copyright (c) 1999-2005 Matt Brunk// // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License VERSION 2 as // published by the Free Software Foundation. You are not allowed to // use any other version of the license; unless you got the explicit // permission from the author to do so. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //------------------------------------------------------------------------------ // DlgSetup.cpp : implementation file // #include "stdafx.h" #include "SmartCard.h" #include "DlgSetup.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDlgSetup dialog CDlgSetup::CDlgSetup(CWnd* pParent /*=NULL*/) : CDialog(CDlgSetup::IDD, pParent) { //{{AFX_DATA_INIT(CDlgSetup) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_uStartNum = 0; m_uCount = 0; } void CDlgSetup::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDlgSetup) DDX_Control(pDX, IDC_EDIT_START_NUM, m_EditStartNum); DDX_Control(pDX, IDC_EDIT_COUNT, m_EditCount); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDlgSetup, CDialog) //{{AFX_MSG_MAP(CDlgSetup) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDlgSetup message handlers void CDlgSetup::OnOK() { CString sss; m_EditStartNum.GetWindowText(sss); sscanf(sss, "%lu", &m_uStartNum); m_EditCount.GetWindowText(sss); sscanf(sss, "%lu", &m_uCount); CDialog::OnOK(); }