DmDlg.cpp
上传用户:heseme
上传日期:2009-12-23
资源大小:228k
文件大小:2k
开发平台:

Visual C++

  1. // httpDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "FireWall1.h"
  5. #include "DmDlg.h"
  6. #include "global.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. extern CDataConvert gDataConvert;
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CDmDlg property page
  15. IMPLEMENT_DYNCREATE(CDmDlg, CPropertyPage)
  16. CDmDlg::CDmDlg() : CPropertyPage(CDmDlg::IDD)
  17. {
  18. //{{AFX_DATA_INIT(CDmDlg)
  19. //}}AFX_DATA_INIT
  20. }
  21. CDmDlg::~CDmDlg()
  22. {
  23. }
  24. void CDmDlg::DoDataExchange(CDataExchange* pDX)
  25. {
  26. CPropertyPage::DoDataExchange(pDX);
  27. //{{AFX_DATA_MAP(CDmDlg)
  28. DDX_Control(pDX, IDC_EDIT4, m_AllowIp);
  29. DDX_Control(pDX, IDC_EDIT3, m_RejIp);
  30. //}}AFX_DATA_MAP
  31. }
  32. BEGIN_MESSAGE_MAP(CDmDlg, CPropertyPage)
  33. //{{AFX_MSG_MAP(CDmDlg)
  34. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  35. //}}AFX_MSG_MAP
  36. END_MESSAGE_MAP()
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CDmDlg message handlers
  39. void CDmDlg::OnButton1() 
  40. {
  41.     gDataConvert.AddIpTable(OUTDM,m_AllowIp);
  42.     gDataConvert.AddIpTable(INDM,m_RejIp);
  43. gDataConvert.SaveChar(m_AllowIp,FALSE,OUTDM);
  44. gDataConvert.SaveChar(m_RejIp,FALSE,INDM);
  45. }
  46. BOOL CDmDlg::OnInitDialog() 
  47. {
  48. CPropertyPage::OnInitDialog();
  49.     gDataConvert.DisplayFireCfg(m_AllowIp,OUTDM);
  50.     gDataConvert.DisplayFireCfg(m_RejIp,INDM);
  51. return TRUE;  // return TRUE unless you set the focus to a control
  52.               // EXCEPTION: OCX Property Pages should return FALSE
  53. }