?? portscandlg.h
字號:
// PortScanDlg.h : header file
//
#if !defined(AFX_PORTSCANDLG_H__8BD76815_8905_11D6_8F32_00E04CE76240__INCLUDED_)
#define AFX_PORTSCANDLG_H__8BD76815_8905_11D6_8F32_00E04CE76240__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CPortScanDlg dialog
//掃描結果
typedef struct
{
int nAttempts;
TCHAR IPAddress[16];
TCHAR port[5];
BOOL bStatus; //1 = open , 0 = close
}DATA;
class CPortScanDlg : public CDialog
{
// Construction
public:
CPortScanDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CPortScanDlg)
enum { IDD = IDD_PORTSCAN_DIALOG };
CProgressCtrl m_cProgress;
CListCtrl m_cResult;
CIPAddressCtrl m_cIP;
CEdit m_cPortTo;
CEdit m_cPortFrom;
CEdit m_cSinglePort;
CEdit m_cAttempts;
CButton m_cBtnStop;
CButton m_cBtnScan;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPortScanDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
BOOL TestConnection(CString IP, UINT nPort);
void ShowHeaders(void); //Shows the headers of member variable m_cResult (See below)
void AddHeader(LPTSTR hdr); //Adds some new headers to m_cResult.
AddItem(int nItem,int nSubItem,LPCTSTR strItem,int nImageIndex = -1); //Adds a new item to m_cResult
BOOL AddColumn(
LPCTSTR strItem,int nItem,int nSubItem = -1,
int nMask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM,
int nFmt = LVCFMT_LEFT);//Adds a new column to m_cResult
UINT m_nMaxAttempts; //試圖連接次數的最大值
BOOL m_bSinglePort; //是否只掃描單個端口
UINT m_minPort,m_maxPort; //掃描端口的范圍
UINT m_nCounter; //端口的個數
CStringList* m_pColumns; //列表框標題欄
CPtrList* m_pStatusList;//保存掃描結果的鏈表
// CBrush* m_pBrush;
// Generated message map functions
//{{AFX_MSG(CPortScanDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnDestroy();
afx_msg void OnRadioSingle();
afx_msg void OnRadioRange();
afx_msg void OnButtonScan();
afx_msg void OnButtonStop();
afx_msg void OnButtonSave();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PORTSCANDLG_H__8BD76815_8905_11D6_8F32_00E04CE76240__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -