www.gusucode.com > VC++开发的ACD树形策略编辑器-源码程序 > VC++开发的ACD树形策略编辑器-源码程序/code/Jump.cpp
//Download by http://www.NewXing.com // Jump.cpp : implementation file // #include "stdafx.h" #include "dsACD_IVR.h" #include "Jump.h" #include "dsACD_IVRDoc.h" #include "dsACD_IVRView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CJump dialog CJump::CJump(CWnd* pParent /*=NULL*/) : CDialog(CJump::IDD, pParent) { //{{AFX_DATA_INIT(CJump) m_csComment = _T(""); m_csSignPos = _T(""); //}}AFX_DATA_INIT } void CJump::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CJump) DDX_Text(pDX, IDC_JMP_COMMENT, m_csComment); DDX_CBString(pDX, IDC_JMP_SIGNPOS, m_csSignPos); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CJump, CDialog) //{{AFX_MSG_MAP(CJump) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CJump message handlers BOOL CJump::OnInitDialog() { CDialog::OnInitDialog(); CComboBox *pSignPos=(CComboBox *)GetDlgItem(IDC_JMP_SIGNPOS); CString buf, csSignPos; m_pDsACD_IVRView->ReadSignPos(buf); while (!buf.IsEmpty()) { csSignPos = buf.Left(buf.Find(";" )); pSignPos->AddString(csSignPos); buf.Delete(0, buf.Find(";" )+1); } int nIndex = pSignPos->SelectString(-1, m_csSignPos); pSignPos->SetCurSel(nIndex); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CJump::DisplayDlg(dsACDObjectBase *pObj) { dsJmp_INFO * pJmpInfo = (dsJmp_INFO*) pObj->Read(); m_csSignPos = pJmpInfo->SignPos; m_csComment = pJmpInfo->Comment; if(DoModal()==IDOK) { pJmpInfo->SignPos = m_csSignPos; pJmpInfo->Comment = m_csComment; } else return; }