📄 ffview.h
字号:
// ffView.h : interface of the CFfView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_FFVIEW_H__C5CB381E_DE00_4F56_8604_1D83B70B958B__INCLUDED_)
#define AFX_FFVIEW_H__C5CB381E_DE00_4F56_8604_1D83B70B958B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ListenSocket.h"
#include "ClientSocket.h"
#include "Midi.h"
#include "ffDoc.h"
class CFfView : public CView
{
protected: // create from serialization only
CFfView();
DECLARE_DYNCREATE(CFfView)
// Attributes
public:
CFfDoc* GetDocument();
CListenSocket* m_pListenSocket;
CClientSocket* m_pClientSocket;
CClientSocket* m_pClientSocket2;
BOOL m_bMyTurn;
BOOL m_bLinked;
BOOL m_bOpponentWin;
BOOL m_bInGame;
int m_nColor;
BOOL m_bFlag;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFfView)
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);
//}}AFX_VIRTUAL
// Implementation
public:
void PlayBGMusic(LPCSTR FileName);
void OneStep(int x, int y);
BOOL IsWin(int x, int y);
void DestroyListenSocket();
void DestroyClientSocket2();
void DestroyClientSocket();
void CreateListenSocket();
void CreateClientSocket(CString& strAddress);
void DrawPieces();
void RequestAccepted(int accept);
void ResetCoords();
virtual ~CFfView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
int m_nCoords[DIVISIONS][DIVISIONS];
CPoint m_ptLastStep;
BOOL m_bMusicOn;
CMidi m_midi;
// Generated message map functions
protected:
//{{AFX_MSG(CFfView)
afx_msg void OnPaint();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnActionDislink();
afx_msg void OnActionLink();
afx_msg void OnActionNew();
afx_msg void OnActionSurrender();
afx_msg void OnMusicMusic();
afx_msg void OnUpdateMusicMusic(CCmdUI* pCmdUI);
afx_msg void OnUpdateActionDislink(CCmdUI* pCmdUI);
afx_msg void OnUpdateActionLink(CCmdUI* pCmdUI);
afx_msg void OnUpdateActionNew(CCmdUI* pCmdUI);
afx_msg void OnUpdateActionSurrender(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg LRESULT OnNewGame(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
};
#ifndef _DEBUG // debug version in ffView.cpp
inline CFfDoc* CFfView::GetDocument()
{ return (CFfDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FFVIEW_H__C5CB381E_DE00_4F56_8604_1D83B70B958B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -