📄 tcpclientexdlg.h
字号:
// TCPClientExDlg.h : header file
//
#if !defined(AFX_TCPCLIENTEXDLG_H__ED108494_C1AB_4361_B288_CE95CF87F1BF__INCLUDED_)
#define AFX_TCPCLIENTEXDLG_H__ED108494_C1AB_4361_B288_CE95CF87F1BF__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "winsock.h"
/////////////////////////////////////////////////////////////////////////////
// CTCPClientExDlg dialog
class CTCPClientExDlg : public CDialog
{
// Construction
public:
CTCPClientExDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTCPClientExDlg)
enum { IDD = IDD_TCPCLIENTEX_DIALOG };
CButton m_ButCreConnect;
CButton m_ButDisConnect;
CString m_RemoteHost;
int m_RemotePort;
CString m_SendEdit;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTCPClientExDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTCPClientExDlg)
virtual BOOL OnInitDialog();
afx_msg void OnDestroy();
afx_msg void OnCreateConnect();
afx_msg void OnClearRecdisp();
afx_msg void OnSend();
afx_msg void OnDisconnect();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
SOCKET m_Socket; /* 本地 Socket */
SOCKADDR_IN m_RemoteAddr; /* 远程主机地址 */
CString m_strRecDisp; /* 接收区显示字符 */
HANDLE m_ExitThreadEvent; /* TCP 接收线程退出事件 */
static DWORD TCPRecvTread(LPVOID lparam); /* TCP 接收数据线程 */
typedef void (CALLBACK *ONTCPRECV)(CWnd* pWnd, char *buf, int buflen);
typedef void (CALLBACK *ONTCPERROR)(CWnd *pWnd, int iErrorCode);
static void CALLBACK OnTcpRecv(CWnd* pWnd, char *buf, int buflen);
static void CALLBACK OnTcpError(CWnd *pWnd, int iErrorCode);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TCPCLIENTEXDLG_H__ED108494_C1AB_4361_B288_CE95CF87F1BF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -