mychessview.h
来自「一个用MFC做的象棋游戏,可以联网双人对下,」· C头文件 代码 · 共 114 行
H
114 行
// MyChessView.h : interface of the CMyChessView class
//
#ifndef HJKHKFJSHKJFHSKJHFKJSHFKJSHJFHKS
#define HJKHKFJSHKJFHSKJHFKJSHFKJSHJFHKS
#pragma once
#include "MyChessDoc.h"
#include "CClientSocket.h"
#include "TalkDialog.h"
class TalkDialog;
class CClientSocket;
class CMyChessView : public CView
{
protected: // create from serialization only
CMyChessView();
DECLARE_DYNCREATE(CMyChessView)
// Attributes
public:
CMyChessDoc* GetDocument() const;
// Operations
public:
CButton m_wndStartButton;
CButton m_wndRestartButton;
public:
CButton m_BtNext;
CButton m_BtPrev;
CButton m_BtReview;
public:
afx_msg void OnBtReview();
afx_msg void OnBtPrev();
afx_msg void OnBtNext();
public:
/////////////////////////////////////////////////////////////////////////////
//socket
CClientSocket *m_pClientSocket;
CClientSocket *m_pTlkSocket;
bool m_bIfLButtonDownMe;
bool m_bIfBCanGo;
bool m_TalkDlg;
bool m_bRegretFrom;
bool m_bMessFrom;//判断信息是不是网络发送出来的
TalkDialog *m_pTalkDLG;
bool m_bIfStart;
bool m_bHeStart;
bool jishi;
bool setJISHIToZero;
UINT uORow,uOCol;//指棋子的逻辑位置
UINT uNRow,uNCol;//指棋子的逻辑位置新位置
CPoint Npoint;//传过去的点的物理位置
//bool m_bIfButtDownFromMe;
void RecieveData(CClientSocket *socket);
void Regret();
// Overrides
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
// Implementation
public:
virtual ~CMyChessView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
bool SaveAs(HWND hWnd);
bool Open(HWND hWnd);
protected:
// Generated message map functions
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnStartButtonClicked();
public:
afx_msg void OnHelpConnect();
public:
afx_msg void OnOperateTalk();
public:
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
afx_msg void OnOperateRegret();
public:
afx_msg void OnFileNew();
public:
afx_msg void OnFileSaveas();
public:
afx_msg void OnFileOpen32776();
public:
// afx_msg void OnOperateNext();
public:
// afx_msg void OnOperatePrev();
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
public:
// afx_msg BOOL OnEraseBkgnd(CDC* pDC);
};
#ifndef _DEBUG // debug version in MyChessView.cpp
inline CMyChessDoc* CMyChessView::GetDocument() const
{ return reinterpret_cast<CMyChessDoc*>(m_pDocument); }
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?