?? tcpnetkitdlg.h
字號:
// TCPNetKitDlg.h : header file
//
#if !defined(AFX_TCPNETKITDLG_H__9876F860_0DA3_42FB_A418_0D2087D93DEB__INCLUDED_)
#define AFX_TCPNETKITDLG_H__9876F860_0DA3_42FB_A418_0D2087D93DEB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TCPSocket.h"
/////////////////////////////////////////////////////////////////////////////
// CTCPNetKitDlg dialog
class CTCPNetKitDlg : public CDialog
{
// Construction
public:
CTCPNetKitDlg(CWnd* pParent = NULL); // standard constructor
//狀態(tài)回調(diào)
static void OnStatusChange(char *data,int length,DWORD userdata);
//數(shù)據(jù)回調(diào)
static void OnDataArrived(char *data,int length,DWORD userdata);
// Dialog Data
//{{AFX_DATA(CTCPNetKitDlg)
enum { IDD = IDD_TCPNETKIT_DIALOG };
CEdit m_ctrlEditClientLog;
CEdit m_ctrlEditServerLog;
CListCtrl m_ctrlListConnections;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTCPNetKitDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTCPNetKitDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnDestroy();
afx_msg void OnStartServer();
afx_msg void OnConnect();
afx_msg LONG OnStatusChangedMsg(WPARAM wParam,LPARAM lParam);
afx_msg LONG OnDataArrivedMsg(WPARAM wParam,LPARAM lParam);
afx_msg void OnClientSend();
afx_msg void OnClearServerLog();
afx_msg void OnClearClientLog();
afx_msg void OnClearSend();
afx_msg void OnClickListConnections(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnServerDisconnect();
afx_msg void OnServerSend();
afx_msg void OnClearServerSend();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CTCPSocket* m_psockServer;
CTCPSocket* m_psockClient;
void AddMessage(LPCTSTR msg,int which);
void UpdateList(LPCTSTR Ip,int No,int Operation);
CString m_strLocalIP; //本機計算機IP
CString m_strLocalName; //本機計算機名
int m_nPortLocal;
int m_nPortRemote;
int m_nCurrentSelect;
CString m_strRemoteIP;
BOOL m_bServerCreated;
BOOL m_bClientConnected;
int GetIpAddress(const CString &sHostName,CString &sIpAddress); //獲取本機IP
int GetLocalHostName(CString &sHostName); //獲取本機計算機名
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TCPNETKITDLG_H__9876F860_0DA3_42FB_A418_0D2087D93DEB__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -