www.pudn.com > SNMP_vc.rar > Input.cpp
// Input.cpp : implementation file
//
#include "stdafx.h"
#include "Monitor.h"
#include "Input.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CInput dialog
CInput::CInput(CWnd* pParent /*=NULL*/)
: CDialog(CInput::IDD, pParent)
{
//{{AFX_DATA_INIT(CInput)
m_strVal = _T("");
m_strOID = _T("");
//}}AFX_DATA_INIT
m_nTypeIndex = 0;
}
void CInput::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CInput)
DDX_Text(pDX, IDC_Value, m_strVal);
DDX_Text(pDX, IDC_Oid, m_strOID);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CInput, CDialog)
//{{AFX_MSG_MAP(CInput)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInput message handlers
BOOL CInput::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
((CComboBox*)GetDlgItem(IDC_ValueType))->SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/************************************************************************/
/* Value Type
ASN_INTEGER
ASN_INTEGER32
ASN_UNSIGNED32
ASN_COUNTER64
ASN_OCTETSTRING
ASN_BITS
ASN_OBJECTIDENTIFIER
ASN_SEQUENCE
ASN_IPADDRESS
ASN_COUNTER32
ASN_GAUGE32
ASN_TIMETICKS
ASN_OPAQUE
*/
/************************************************************************/
void CInput::OnOK()
{
// TODO: Add extra validation here
m_nTypeIndex = ((CComboBox*)GetDlgItem(IDC_ValueType))->GetCurSel();
CDialog::OnOK();
}