网络实验网络实验网络实验网络实验网络实验
源代码在线查看: clientdlg.h
// clientDlg.h : header file
//
#if !defined(AFX_CLIENTDLG_H__DFB67728_1039_422F_BB73_4C7203AF5731__INCLUDED_)
#define AFX_CLIENTDLG_H__DFB67728_1039_422F_BB73_4C7203AF5731__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include
#include "protocol.h"
/////////////////////////////////////////////////////////////////////////////
// CClientDlg dialog
class CClientDlg : public CDialog
{
// Construction
public:
CClientDlg(CWnd* pParent = NULL); // standard constructor
//定义自己的变量
SOCKET cli_sock;
struct sockaddr_in seraddr;
// Dialog Data
//{{AFX_DATA(CClientDlg)
enum { IDD = IDD_CLIENT_DIALOG };
CString m_sShowText;
CString m_sServerIp;
CString m_sServerPort;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
int ilost_percent;
int iwrong_percent;
int timeout_interval;
int MAX_repeatnum;
// Generated message map functions
//{{AFX_MSG(CClientDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnContoserButton();
afx_msg void OnConfigButton();
afx_msg void OnSenderButton();
afx_msg void OnEndButton();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
//定义自己的函数
void Write_to_ShowText(CString str);//将要显示的信息写入显示框中
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLIENTDLG_H__DFB67728_1039_422F_BB73_4C7203AF5731__INCLUDED_)