tcpclientdlg.h

来自「WinCE试验-无线网络通信」· C头文件 代码 · 共 56 行

H
56
字号
// TcpClientDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "TCPSocket.h"

// CTcpClientDlg dialog
class CTcpClientDlg : public CDialog
{
// Construction
public:
	CTcpClientDlg(CWnd* pParent = NULL);	// standard constructor
	//状态回调
	static void OnStatusChange(char *data,int length,DWORD userdata);
	//数据回调
	static void OnDataArrived(char *data,int length,DWORD userdata);
// Dialog Data
	enum { IDD = IDD_TCPCLIENT_DIALOG };


	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
	afx_msg void OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/);
#endif
	DECLARE_MESSAGE_MAP()
public:
	CEdit m_ctrlEditClientLog;
private:
	//CWnd* m_pParent;  //父窗口,用来向主窗口传递消息

	BOOL m_bClientConnected;
	//int m_nPortRemote;
private:
	CTCPSocket* m_psockClient;
	afx_msg void OnBnClickedConnect();
private:
	//CString m_strRemoteIP;
	afx_msg void OnBnClickedClearClientLog();
	afx_msg void OnBnClickedClearSend();
	afx_msg void OnBnClickedSend();

private:
	void AddMessage(LPCTSTR msg);
	int m_nPortRemote;
	CString m_strRemoteIP;
};

⌨️ 快捷键说明

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