📄 dddialog.h
字号:
/****************************************************************************
** **
** **
** Copyright (c) 2004 microOLAP Technologies LTD, **
** Halturin A.P., Naumov D.A. **
** Header File **
** **
****************************************************************************/
//-----------------------------------------------------------------------------
#ifndef __DDDIALOG_H__
#define __DDDIALOG_H__
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// CDDDialog dialog
//-----------------------------------------------------------------------------
class CDDDialog : public CDialog
{
// Construction
public:
CDDDialog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDDDialog)
enum { IDD = IDD_PACKETSTAT_DIALOG };
CEdit WndPktCount;
CListCtrl CountersList;
CButton MgrInitBtn;
CEdit ctrlDumpLimit;
CButton CloseBtn;
CButton OpenBtn;
CComboBox cbNetCardList;
CString strBpfAccept;
CString strBpfProcess;
CString strBpfReceive;
CString strBpfReject;
CString strNdisMissed;
CString strNdisRecvWithErr;
CString strNdisRecvWithoutErr;
CString strNdisTranWithErr;
CString strNdisTranWithoutErr;
CString PktPoolCountEdit;
CString PoolMem_Label;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDDDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CDDDialog)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnAboutBtn();
afx_msg void OnManagerInitBtn();
afx_msg void OnOpenBtn();
afx_msg void OnCloseBtn();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnDestroy();
afx_msg void OnClearBtn();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CHNPSManager HNPSManager;
CHNAdapter HNAdapter;
CHNUserFilter HNUserFilter;
CHNQueue HNQueue;
CString Str;
char *ValFormat[4];
public:
void OnConfigChange(HANDLE hCfg, DWORD ChangeType);
void OnPacketReceive(DWORD_PTR ThParam, HANDLE hPacket, LPVOID pPacketData, DWORD IncPacketSize);
void Stop();
void GetStat(BOOL IsAsync);
void ClearCounters();
void ShowCounters();
const char *IntToStr(DWORD Val)
{
Str.Format("%u",Val);
return (LPCSTR)Str;
}
const char *IntToStr(DWORD Val, char *AddStr)
{
Str.Format("%u%s",Val,AddStr);
return (LPCSTR)Str;
}
const char *GetRate(DWORD Val)
{
double tmp;
double RealVal;
int Index;
tmp = Val;
Index = -1;
do
{
Index += 1;
RealVal = tmp;
tmp /= 1024.0;
}
while (tmp > 1.0);
Str.Format(ValFormat[Index],RealVal);
return (LPCSTR)Str;
}
void __stdcall ProcessPacket(void* hPacket);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
//-----------------------------------------------------------------------------
#endif // __DDDIALOG_H__
//-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -