home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / NETTOOLS.ZIP / NetstatDlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-12-22  |  2.0 KB  |  80 lines

  1. // NetstatDlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "nettools.h"
  6. #include "inetthreadparms.h"
  7. #include "NetstatDlg.h"
  8. //#include "Worker.h"
  9.  
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CNetstatDlg dialog
  18.  
  19.  
  20. CNetstatDlg::CNetstatDlg(CWnd* pParent /*=NULL*/)
  21.     : CDialog(CNetstatDlg::IDD, pParent)
  22. {
  23.     //{{AFX_DATA_INIT(CNetstatDlg)
  24.     m_connections = FALSE;
  25.     m_icmpstats = FALSE;
  26.     m_ifstats = FALSE;
  27.     m_ipstats = FALSE;
  28.     m_routes = FALSE;
  29.     m_tcpstats = FALSE;
  30.     m_udpstats = FALSE;
  31.     m_all = FALSE;
  32.     m_resolve = FALSE;
  33.     //}}AFX_DATA_INIT
  34. }
  35.  
  36.  
  37. void CNetstatDlg::DoDataExchange(CDataExchange* pDX)
  38. {
  39.     CDialog::DoDataExchange(pDX);
  40.     //{{AFX_DATA_MAP(CNetstatDlg)
  41.     DDX_Check(pDX, IDC_NETSTAT_OPT_CONNS, m_connections);
  42.     DDX_Check(pDX, IDC_NETSTAT_OPT_ICMPSTATS, m_icmpstats);
  43.     DDX_Check(pDX, IDC_NETSTAT_OPT_IFSTATS, m_ifstats);
  44.     DDX_Check(pDX, IDC_NETSTAT_OPT_IPSTATS, m_ipstats);
  45.     DDX_Check(pDX, IDC_NETSTAT_OPT_ROUTES, m_routes);
  46.     DDX_Check(pDX, IDC_NETSTAT_OPT_TCPSTATS, m_tcpstats);
  47.     DDX_Check(pDX, IDC_NETSTAT_OPT_UDPSTATS, m_udpstats);
  48.     DDX_Check(pDX, IDC_NETSTAT_OPT_ALL, m_all);
  49.     DDX_Check(pDX, IDC_NETSTAT_OPT_RESOLVE, m_resolve);
  50.     //}}AFX_DATA_MAP
  51. }
  52.  
  53.  
  54. BEGIN_MESSAGE_MAP(CNetstatDlg, CDialog)
  55.     //{{AFX_MSG_MAP(CNetstatDlg)
  56.     //}}AFX_MSG_MAP
  57. END_MESSAGE_MAP()
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CNetstatDlg message handlers
  61.  
  62. void CNetstatDlg::OnOK() 
  63. {
  64.     if (!UpdateData(TRUE))  // retrieve and validate data
  65.         return;                // validate failed
  66.  
  67.     m_lpInetParms->connections = m_connections;
  68.     m_lpInetParms->icmpstats = m_icmpstats;
  69.     m_lpInetParms->ifstats = m_ifstats;
  70.     m_lpInetParms->ipstats = m_ipstats;
  71.     m_lpInetParms->routtable = m_routes;
  72.     m_lpInetParms->tcpstats = m_tcpstats;
  73.     m_lpInetParms->udpstats = m_udpstats;
  74.     m_lpInetParms->allopts =  m_all;
  75.     m_lpInetParms->resolveaddrs = m_resolve;
  76.     
  77.     CDialog::OnOK();
  78. }
  79.  
  80.