www.gusucode.com > VC++开发的ACD树形策略编辑器-源码程序 > VC++开发的ACD树形策略编辑器-源码程序/code/Function.cpp

    // Function.cpp : implementation file
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "dsACD_IVR.h"
#include "Function.h"

#include "dsACD_IVRDoc.h"
#include "dsACD_IVRView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFunction dialog


CFunction::CFunction(CWnd* pParent /*=NULL*/)
	: CDialog(CFunction::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFunction)
	m_csComment = _T("");
	//}}AFX_DATA_INIT
}


void CFunction::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFunction)
	DDX_Text(pDX, IDC_FUN_COMMENT, m_csComment);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFunction, CDialog)
	//{{AFX_MSG_MAP(CFunction)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFunction message handlers
void CFunction::DisplayDlg(dsACDObjectBase *pObj)
{
	dsFun_INFO * pFunInfo = (dsFun_INFO*) pObj->Read();
	m_csComment = pFunInfo->Comment;

	if(DoModal()==IDOK)
	{
		pFunInfo->Comment = m_csComment;
	}
	else 
		return;
}