📄 winsockclientdlg.h
字号:
// WinSockClientDlg.h : header file
//
#if !defined(AFX_WINSOCKCLIENTDLG_H__C9CF5D77_4569_4DE5_B457_E0E1A03D4BB4__INCLUDED_)
#define AFX_WINSOCKCLIENTDLG_H__C9CF5D77_4569_4DE5_B457_E0E1A03D4BB4__INCLUDED_
#include "SocketClient.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CWinSockClientDlg dialog
class CWinSockClientDlg : public CDialog
{
// Construction
public:
//声明如下四个函数跟SocketClient类的事件关联。
void OnSend();
void OnReceive();
void OnSocketClose();
void OnConnect();
CWinSockClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CWinSockClientDlg)
enum { IDD = IDD_WINSOCKCLIENT_DIALOG };
CEdit m_ctlPort;
CEdit m_ctlName;
CButton m_btnSend;
CButton m_btnExit;
CButton m_btnDisConn;
CButton m_btnConn;
CButton m_btnClear;
CListBox m_lstChat;
CEdit m_ctlData;
CString m_strData;
CString m_strChat;
CString m_strName;
int m_iPort;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWinSockClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CWinSockClientDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnCancel();
virtual void OnOK();
afx_msg void OnClose();
afx_msg void OnExit();
afx_msg void OnClientConnect();
afx_msg void OnMsgSend();
afx_msg void OnDisConnect();
afx_msg void OnClear();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
//定义客户端的Socket
CSocketClient m_cSocket;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WINSOCKCLIENTDLG_H__C9CF5D77_4569_4DE5_B457_E0E1A03D4BB4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -