typedef struct tagPacketList
{
unsigned long srcIp;
unsigned long desIp;
unsigned char protocol;
unsigned long srcPort;
unsigned long desPort;
unsigned long len;
char data[256];
}PacketList;
我们需要在对话框的初始化函数中构造上述界面中的表格项目,相关源代码如下:
BOOL CNetHackerDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
int i=0;
//…