// DupIndx.cpp : implementation file // #include "stdafx.h" #include "BarCode.h" #include "DupIndx.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDupIndex dialog CDupIndex::CDupIndex(CWnd* pParent /*=NULL*/) : CDialog(CDupIndex::IDD, pParent) { //{{AFX_DATA_INIT(CDupIndex) m_nIndex = 0; //}}AFX_DATA_INIT } void CDupIndex::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDupIndex) DDX_Control(pDX, IDC_INDEX, m_EditIndex); DDX_Control(pDX, IDOK, m_BtnOk); DDX_Text(pDX, IDC_INDEX, m_nIndex); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDupIndex, CDialog) //{{AFX_MSG_MAP(CDupIndex) ON_EN_CHANGE(IDC_INDEX, OnChangeIndex) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDupIndex message handlers void CDupIndex::OnChangeIndex() { CString strIndex; m_EditIndex.GetWindowText(strIndex); if (strIndex.IsEmpty()) m_BtnOk.EnableWindow(FALSE); else m_BtnOk.EnableWindow(); }