⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectdlg.cpp

📁 This article describes a sniffer for Windows. WinSniff is an application for capturing packets on th
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////
//
//   WinSniff 1.1
//   The sniffing tool for windows.
//
//   Author  : Nagareshwar Y Talekar.
//	 Contact : nsry2002@yahoo.co.in
//	 Date    : 15-6-2004.
//
//   Name :  SelectDlg.cpp
//   Description :  Displays a dialog box for selecting device
//					for capturing packet.
//
//////////////////////////////////////////////////////////////////////////////


#include "stdafx.h"
#include "capturepacket.h"
#include "SelectDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// SelectDlg dialog


SelectDlg::SelectDlg(Sniffer *s)
    : CDialog(SelectDlg::IDD, NULL)
{
	
	// Pointer to Sniffer class
	sniff=s;
	

	//{{AFX_DATA_INIT(SelectDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void SelectDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SelectDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SelectDlg, CDialog)
	//{{AFX_MSG_MAP(SelectDlg)
	ON_BN_CLICKED(IDOK, OnSelect)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()




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


   devlist=(CComboBox*)GetDlgItem(IDC_COMBO1);
   devlist->SetWindowPos(&wndTop,0,0,250,120,SWP_SHOWWINDOW | SWP_NOMOVE);
	
   for(int i=0;i<sniff->devcount;i++)
   {
   devlist->AddString(sniff->description[i]);
   }

   devlist->SetCurSel(0);

	return TRUE;
}




void SelectDlg::OnSelect() 
{

	selindex=devlist->GetCurSel();

	CDialog::OnOK();	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -