FiveChessView.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. // FiveChessView.h : interface of the CFiveChessView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FIVECHESSVIEW_H__6E62C787_E804_4966_8738_1664043E1DF4__INCLUDED_)
  5. #define AFX_FIVECHESSVIEW_H__6E62C787_E804_4966_8738_1664043E1DF4__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "ServerSocket.h"
  10. #include "ClientSocket.h"
  11. #include "Match.h"
  12. class CFiveChessDoc;
  13. class CFiveChessView : public CView
  14. {
  15. protected: // create from serialization only
  16. CFiveChessView();
  17. DECLARE_DYNCREATE(CFiveChessView)
  18. // Attributes
  19. public:
  20. CFiveChessDoc* GetDocument();
  21. public:
  22. CString m_sMsgList;
  23. CServerSocket m_ListenSocket;
  24. CClientSocket m_ClientSocket;
  25. BOOL m_bIsClient;
  26. BOOL m_bIsInit;
  27. int m_port;
  28. CString m_ip;
  29. BYTE m_bIP[4];
  30. CString m_sLocalName;
  31. CEdit m_inputedit;
  32. CEdit m_outputedit;
  33. int m_iLineCurrentPos;
  34. public:
  35. Match m_match;
  36. int m_who;
  37. int m_turn;//轮谁走棋
  38. int m_POS[2];//落子的位置
  39. int m_winpos[5][2];
  40. BOOL m_bWin; //
  41. BOOL m_bOver;//结束了
  42. public:
  43. void ProcessPendingAccept();
  44. void GetLocalIP();
  45. // Operations
  46. public:
  47. // Overrides
  48. // ClassWizard generated virtual function overrides
  49. //{{AFX_VIRTUAL(CFiveChessView)
  50. public:
  51. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  52. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  53. virtual void OnInitialUpdate();
  54. protected:
  55. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  56. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  57. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. public:
  61. virtual ~CFiveChessView();
  62. #ifdef _DEBUG
  63. virtual void AssertValid() const;
  64. virtual void Dump(CDumpContext& dc) const;
  65. #endif
  66. protected:
  67. // Generated message map functions
  68. protected:
  69. //{{AFX_MSG(CFiveChessView)
  70. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  71. afx_msg void INPUTMESSAGE ();
  72. afx_msg void OnSetclient();
  73. afx_msg void OnSetserver();
  74. //}}AFX_MSG
  75. DECLARE_MESSAGE_MAP()
  76. };
  77. #ifndef _DEBUG  // debug version in FiveChessView.cpp
  78. inline CFiveChessDoc* CFiveChessView::GetDocument()
  79.    { return (CFiveChessDoc*)m_pDocument; }
  80. #endif
  81. /////////////////////////////////////////////////////////////////////////////
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  84. #endif // !defined(AFX_FIVECHESSVIEW_H__6E62C787_E804_4966_8738_1664043E1DF4__INCLUDED_)