• 大小: 2.88MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-10
  • 语言: C/C++
  • 标签: 网络编程  扫描器  

资源简介

网络 扫描器 源代码 mfc框架

资源截图

代码片段和文件信息

// DialogPingInList.cpp : implementation file
//

#include “stdafx.h“
#include “MultiPing.h“
#include “DialogPingInList.h“
#include “MultiPingDlg.h“

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

/////////////////////////////////////////////////////////////////////////////
// CDialogPingInList dialog


CDialogPingInList::CDialogPingInList(CWnd* pParent /*=NULL*/)
: CDialog(CDialogPingInList::IDD pParent)
{
//{{AFX_DATA_INIT(CDialogPingInList)
m_strComment = _T(““);
m_strIP = _T(““);
//}}AFX_DATA_INIT
}


void CDialogPingInList::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDialogPingInList)
DDX_Control(pDX IDC_LIST_Result m_ctlListResult);
DDX_Text(pDX IDC_EDIT_Comment m_strComment);
DDX_Text(pDX IDC_EDIT_IP m_strIP);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialogPingInList CDialog)
//{{AFX_MSG_MAP(CDialogPingInList)
ON_BN_CLICKED(IDC_BUTTON_AddToList OnBUTTONAddToList)
ON_BN_CLICKED(IDC_BUTTON_ModifyToList OnBUTTONModifyToList)
ON_BN_CLICKED(IDC_BUTTON_DelFromList OnBUTTONDelFromList)
ON_NOTIFY(NM_DBLCLK IDC_LIST_Result OnDblclkLISTResult)
ON_BN_CLICKED(IDC_BUTTON_DeleteAll OnBUTTONDeleteAll)
ON_BN_CLICKED(IDC_BUTTON_Up OnBUTTONUp)
ON_BN_CLICKED(IDC_BUTTON_Down OnBUTTONDown)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialogPingInList message handlers

BOOL CDialogPingInList::OnInitDialog() 
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
m_ctlListResult.InsertColumn(LIST_RESULT_INDEX“序号“LVCFMT_LEFT20);
m_ctlListResult.InsertColumn(LIST_RESULT_IPSTR“IP地址“LVCFMT_LEFT110);
m_ctlListResult.InsertColumn(LIST_RESULT_STATE“状态“LVCFMT_LEFT40);
m_ctlListResult.InsertColumn(LIST_RESULT_COMMENT“注释“LVCFMT_LEFT170);
//m_ctlListResult.InsertColumn(LIST_RESULT_NAME“主机名“LVCFMT_LEFT0);
//m_ctlListResult.InsertColumn(LIST_RESULT_TIME“时间“LVCFMT_LEFT0);
//m_ctlListResult.InsertColumn(LIST_RESULT_IPINT“IP整数“LVCFMT_LEFT0);
m_ctlListResult.SetExtendedstyle(LVS_EX_FULLROWSELECT| LVS_EX_GRIDLINES);

ReadFromINI(TRUE);
UpdateData(FALSE);
return TRUE;  // return TRUE unless you set the focus to a control
              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDialogPingInList::ReadFromINI(BOOL bAddToList)
{
char buff[MAX_PATH];
CString strItemIPstrItemComment;
m_iItemCount=GetPrivateProfileInt(“List““Count“0INIFILENAME);
int iCount=0;//实际的个数。
for (int i=0;i {
strItemIP.Format(“IP%d“i+1);
GetPrivateProfileString(“List“strItemIP““buffMAX_PATHINIFILENAME);
m_strItemIP[i].Format(“%s“buff);
if (m_strItemIP[i].GetLength()<7)
break;
strItemComment.Format(“Comment%d“i+1);
GetPrivateProfileString(“List“strItemComment““buffMAX_PATHINIFILENAME);
m_strItemComment[i].F

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-09 13:12  ICMP\
     文件        9012  2011-05-24 20:45  ICMP\DialogPingInList.cpp
     文件        1825  2011-05-05 20:18  ICMP\DialogPingInList.h
     文件      380624  2018-04-09 13:05  ICMP\MultiPing.aps
     文件        2740  2018-04-09 13:12  ICMP\MultiPing.clw
     文件        2168  2018-04-09 13:05  ICMP\MultiPing.cpp
     文件        4485  2011-05-04 16:42  ICMP\MultiPing.dsp
     文件         541  2011-05-25 23:27  ICMP\MultiPing.dsw
     文件        1357  2010-05-07 13:29  ICMP\MultiPing.h
     文件         173  2018-04-09 13:12  ICMP\MultiPing.ini
     文件      279552  2018-04-09 13:12  ICMP\MultiPing.ncb
     文件      401920  2018-04-09 13:12  ICMP\MultiPing.opt
     文件        1699  2018-04-09 13:10  ICMP\MultiPing.plg
     文件        8040  2018-04-09 13:05  ICMP\MultiPing.rc
     文件       21598  2011-07-02 22:04  ICMP\MultiPingDlg.cpp
     文件        1988  2011-05-27 06:26  ICMP\MultiPingDlg.h
     文件        3633  2010-05-07 13:29  ICMP\ReadMe.txt
     目录           0  2018-04-09 13:10  ICMP\Release\
     文件       26373  2018-04-09 13:10  ICMP\Release\DialogPingInList.obj
     文件      380928  2018-04-09 13:10  ICMP\Release\MultiPing.exe
     文件       10200  2018-04-09 13:10  ICMP\Release\MultiPing.obj
     文件     5831816  2018-04-09 13:10  ICMP\Release\MultiPing.pch
     文件      345432  2018-04-09 13:10  ICMP\Release\MultiPing.res
     文件       44623  2018-04-09 13:10  ICMP\Release\MultiPingDlg.obj
     文件         768  2018-04-09 13:10  ICMP\Release\StdAfx.obj
     文件       50176  2018-04-09 13:10  ICMP\Release\vc60.idb
     文件         211  2010-05-07 13:29  ICMP\StdAfx.cpp
     文件        2020  2011-05-25 06:10  ICMP\StdAfx.h
     目录           0  2018-04-09 12:55  ICMP\res\
     文件      340372  2011-04-07 17:35  ICMP\res\Head.bmp
     文件        2238  2002-06-07 15:24  ICMP\res\MultiPing.ico
............此处省略3个文件信息

评论

共有 条评论