📄 superserverview.h
字号:
// SuperServerView.h : interface of the CSuperServerView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SUPERSERVERVIEW_H__0030451B_A3D7_4162_99E0_AB9D468C3BBB__INCLUDED_)
#define AFX_SUPERSERVERVIEW_H__0030451B_A3D7_4162_99E0_AB9D468C3BBB__INCLUDED_
#define Max 100
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "msg.h"
#include "Socketlisten.h"
#include "SocketCLIENT.H"
class CSuperServerSet;
class CSuperServerDoc;
class CSuperServerView : public CDaoRecordView
{
protected: // create from serialization only
CSuperServerView();
DECLARE_DYNCREATE(CSuperServerView)
public:
//{{AFX_DATA(CSuperServerView)
enum { IDD = IDD_SUPERSERVER_FORM };
CStatic m_staState;
CSuperServerSet* m_pSet;
//}}AFX_DATA
// Attributes
public:
CSuperServerDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSuperServerView)
public:
virtual CDaoRecordset* OnGetRecordset();
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
int m_iPort;//服务器端口
CSocketListen * m_pSocket;
CSocketClient m_SocketClient[Max];
CArchive * m_pArOut;
CArchive * m_pArIn;
CSocketFile * m_pSF;
CMsg msg;//消息类对象
CString Decode(int n,CString strMsg);
void SendUserList();
bool CheckLogin(CSocketClient *pClient);
void MyReceive(CSocketClient *pClient);
void MyClose(CSocketClient *pClient);
void MyAccept();
virtual ~CSuperServerView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CSuperServerView)
afx_msg void OnStartServer();
afx_msg void OnStopServer();
afx_msg void OnButtonAdd();
afx_msg void OnButtonDel();
afx_msg void OnButtonModify();
afx_msg void OnButtonFind();
afx_msg void OnButtonBack();
afx_msg void OnButtonForward();
afx_msg void OnSetPort();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in SuperServerView.cpp
inline CSuperServerDoc* CSuperServerView::GetDocument()
{ return (CSuperServerDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SUPERSERVERVIEW_H__0030451B_A3D7_4162_99E0_AB9D468C3BBB__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -