📄 gameframe.h
字号:
#if !defined(AFX_GAMEFRAME_H__96A787A7_A296_408C_9EB8_5B71E226604B__INCLUDED_)
#define AFX_GAMEFRAME_H__96A787A7_A296_408C_9EB8_5B71E226604B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// GameFrame.h : header file
//
#include <afxext.h>
/////////////////////////////////////////////////////////////////////////////
// CGameFrame frame
struct GameIngo
{
int m_nNumber; //各家牌的个数
int m_nMyorient; //各家坐的方位
char m_name[20]; //各家名字
int m_score; //积分
int m_nGameState; //游戏状态
int m_nmycardNumber[13];//牌,最多13张
int currentchupai; //当前所出的牌
};
class CGameFrame : public CFrameWnd
{
DECLARE_DYNCREATE(CGameFrame)
public:
CGameFrame(); // protected constructor used by dynamic creation
// Attributes
public:
CBitmap *bitmapcard;
CDC *mdc;
CDC *mdcgame;
CBitmapButton buttonchupai;
CBitmapButton buttonliangpai;
GameIngo m_gameinfo[4];
bool newgame;
int cardfangxiang;//出牌方向
// Operations
public:
void OnOppsitechupai(int cardnumber);//对家出牌
void Onrightchupai(int cardnumber); //右邻居出牌
void Onleftchupai(int cardnumber); //左邻居出牌
void Drawrightcard();
void Drawleftcard();
void Onchupai(); //出牌
void Onquit(); //退出
void Onsend(); //发送消息
void Onstart(); //开始
void DrawInit(); //初始化
void Drawoppsitecard();//更新对家牌
void DrawScore(); //更新分牌显示去
void DrawMycard(); //更新我的牌
bool flagredrawchupai;//是否重画出牌区
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGameFrame)
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CGameFrame();
// Generated message map functions
//{{AFX_MSG(CGameFrame)
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
//int m_nGameState;
void testcard(CPoint point);
int m_card_lbuttondown; //出牌位置
int numbertime;
int m_ntimetotal;
CListCtrl*list;
CComboBox talk;
CListCtrl*listchart;
CButton m_buttonStart;
CButton m_buttonSend;
CButton m_ButtonExit;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GAMEFRAME_H__96A787A7_A296_408C_9EB8_5B71E226604B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -