Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CServerFrameView.h
Package: zhou_NetworkGame-JunQi.rar [view]
Upload User: bsw_2008
Upload Date: 2013-07-09
Package Size: 2446k
Code Size: 3k
Category:
Chess Poker games
Development Platform:
Visual C++
- // CServerFrameView.h : interface of the CCServerFrameView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CSERVERFRAMEVIEW_H__77E02202_2828_44A0_B4CB_34ED28E0F3B3__INCLUDED_)
- #define AFX_CSERVERFRAMEVIEW_H__77E02202_2828_44A0_B4CB_34ED28E0F3B3__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CCServerFrameSet;
- #include "Server.h"
- #include <afxtempl.h>
- #include "ServerProtocol.h"
- #define SER_MESSAGE WM_USER + 100
- /////////////////////////////////////////////////////////////////////////////
- // CServerFrameView
- typedef CList <SOCKET,SOCKET&> SOCKET_ARRAY;
- class CCServerFrameDoc;
- class CCServerFrameView : public CRecordView
- {
- typedef struct TT{
- int d[4];
- int ID[4];
- int board[17][17];
- BOOL begin[4];
- };
- typedef struct MM{
- CString name,sex;
- int score;
- };
- protected: // create from serialization only
- CCServerFrameView();
- DECLARE_DYNCREATE(CCServerFrameView)
- public:
- MM user[64];
- SOCKET_ARRAY m_connectionList;
- TT table[4][4];
- CServer m_server;
- //SOCKET_ARRAY m_connectionList;
- //{{AFX_DATA(CCServerFrameView)
- enum { IDD = IDD_CSERVERFRAME_FORM };
- CListCtrl m_OnlineList;
- CEdit m_output;
- CListCtrl m_UserList;
- CCServerFrameSet* m_pSet;
- CString m_sShowText;
- //}}AFX_DATA
- // Attributes
- public:
- CCServerFrameDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CCServerFrameView)
- public:
- virtual CRecordset* OnGetRecordset();
- 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);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CCServerFrameView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- void RecordModify(int i,int score);
- void dealloss(int desk,int direct);
- void play(int i);
- void GamerBegin(int i);
- POINT rotate(POINT original,int direct);
- void SendUserMessage(int i);
- void Leave(int i);
- void SitDown(int i);
- CString TableMessage();
- BOOL compare(CString s1,CString s2);
- void validate(int i);
- void RecordAddnew(int i);
- void ChatMessage(int i);
- void dealMessage(char k,int i);
- CServerProtocol protocol;
- BOOL m_bInit;
- void SetServer();
- afx_msg LRESULT OnServerMessage(WPARAM wParam, LPARAM lParam);
- //{{AFX_MSG(CCServerFrameView)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in CServerFrameView.cpp
- inline CCServerFrameDoc* CCServerFrameView::GetDocument()
- { return (CCServerFrameDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_CSERVERFRAMEVIEW_H__77E02202_2828_44A0_B4CB_34ED28E0F3B3__INCLUDED_)