📄 chatserverview.h
字号:
// chatserverView.h : interface of the CChatserverView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHATSERVERVIEW_H__1973AEFD_D8A1_4111_99DD_E01CD29395D6__INCLUDED_)
#define AFX_CHATSERVERVIEW_H__1973AEFD_D8A1_4111_99DD_E01CD29395D6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "chatSocket.h"
#include "LisnSocket.h"
#include "chatserverDoc.h"
class CMesg;
class CChatserverView : public CFormView
{
protected: // create from serialization only
CChatserverView();
DECLARE_DYNCREATE(CChatserverView)
public:
//{{AFX_DATA(CChatserverView)
enum { IDD = IDD_CHATSERVER_FORM };
CListBox m_list;
CStatic m_info;
CButton m_start;
CButton m_end;
//}}AFX_DATA
// Attributes
public:
CChatserverDoc* GetDocument();
// Operations
public:
int initflag;
CLisnSocket *m_listensock;
CPtrList m_clientlist;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChatserverView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void deletefromlist(CString name);
void addtolist(CString name);
void sendmsg(CchatSocket *sock,CMesg *msg);
void UpdateClient(CMesg *msg,CchatSocket *clientsock);
void Receive(CchatSocket *clientsock);
void Accept();
virtual ~CChatserverView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CChatserverView)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnStart();
afx_msg void OnEnd();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in chatserverView.cpp
inline CChatserverDoc* CChatserverView::GetDocument()
{ return (CChatserverDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHATSERVERVIEW_H__1973AEFD_D8A1_4111_99DD_E01CD29395D6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -