www.pudn.com > SNMP·¶ÀýÔ´´úÂë.zip > ChangeAgent.cpp


// ChangeAgent.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "oam.h" 
#include "ChangeAgent.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CChangeAgent dialog 
 
 
CChangeAgent::CChangeAgent(CWnd* pParent /*=NULL*/) 
	: CDialog(CChangeAgent::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CChangeAgent) 
	m_agent = _T(""); 
	m_community = _T(""); 
	//}}AFX_DATA_INIT 
} 
 
 
void CChangeAgent::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CChangeAgent) 
	DDX_Control(pDX, IDC_IPADDRESS_IP, m_agent1); 
	DDX_Text(pDX, IDC_EDIT_IP, m_agent); 
	DDX_Text(pDX, IDC_EDIT_COMMUNITY, m_community); 
	DDX_Control(pDX, IDOK, m_btOk); 
	DDX_Control(pDX, IDCANCEL, m_btCancel); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CChangeAgent, CDialog) 
	//{{AFX_MSG_MAP(CChangeAgent) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CChangeAgent message handlers 
 
 
 
BOOL CChangeAgent::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
 
	GetDlgItem(IDC_EDIT_IP)->SetFocus(); 
 
	m_btOk.LoadAVI(IDR_AVI_OK); 
	m_btCancel.LoadAVI(IDR_AVI_CANCEL); 
	m_agent="172.18.90.99"; 
	m_community="public"; 
    UpdateData(FALSE); 
	// TODO: Add extra initialization here 
 
	 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
}