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

📄 step3_tcptestdlg.h

📁 EVC4.0入门程序 关于TCP测试使用工具
💻 H
字号:
// step3_tcptestDlg.h : header file
//

#if !defined(AFX_STEP3_TCPTESTDLG_H__BBB83E37_2C1F_467E_8021_71E12D9272DD__INCLUDED_)
#define AFX_STEP3_TCPTESTDLG_H__BBB83E37_2C1F_467E_8021_71E12D9272DD__INCLUDED_

#include "tcpclient_ce.h"
#include "tcpserver_ce.h"

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

/////////////////////////////////////////////////////////////////////////////
// CStep3_tcptestDlg dialog

class CStep3_tcptestDlg : public CDialog
{
// Construction
public:
	CStep3_tcptestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CStep3_tcptestDlg)
	enum { IDD = IDD_STEP3_TCPTEST_DIALOG };
	CButton	m_btnConnect;
	CListBox	m_RecvList;
	CListBox	m_SendList;
	CComboBox	m_SocketType;
	CString	m_strIPAddress;
	CString	m_strMessage;
	int		m_nPort;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStep3_tcptestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CStep3_tcptestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonClose();
	afx_msg void OnButtonSend();
	afx_msg void OnSelchangeCOMBOMode();
	afx_msg void OnButtonConnect();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	//定义CTCPClient_CE对象
	CTCPClient_CE m_TCPClient;
	//定义CTCPServer_CE对象
	CTCPServer_CE m_TCPServer;
private:
	//客户端连接建立事件处理函数
	static void CALLBACK OnAccept(CWnd* pWnd );
	//连接断开事件处理函数
	static void CALLBACK OnClose(CWnd* pWnd);
	//当有数据接收事件处理函数
	static void CALLBACK OnRead(CWnd* pWnd );
	//Socket错误事件处理函数
	static void CALLBACK OnError(CWnd* pWnd,int nErrorCode);
public:
	char RecvBuf[1500];
	int  RecvLen;

};

//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STEP3_TCPTESTDLG_H__BBB83E37_2C1F_467E_8021_71E12D9272DD__INCLUDED_)

⌨️ 快捷键说明

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