wuziqidlg.h

来自「基于BHRTI开发环境的简单五子棋游戏」· C头文件 代码 · 共 95 行

H
95
字号
// wuziqiDlg.h : header file
//


#if !defined(AFX_WUZIQIDLG_H__06A3A9DA_7268_4136_92C8_15F766D656B1__INCLUDED_)
#define AFX_WUZIQIDLG_H__06A3A9DA_7268_4136_92C8_15F766D656B1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//#include "RTI.h"
#include "stdafx.h"
#include "wuziqi.h"
#include "rti.hh"

/////////////////////////////////////////////////////////////////////////////
// CWuziqiDlg dialog

class CWuziqiDlg : public CDialog
{
// Construction
public:
	void sendwinmsg(const char *myname);
   struct  coordinate
	{
	int x;
	int y;
	unsigned int color;
	};
    void stringtostruct(char p1[],int n,coordinate *qiziifo);
	void structtostring(coordinate *p1);
	void receiveMessage(RTI::InteractionClassHandle       theInteraction,     
								const RTI::ParameterHandleValuePairSet& theParameters,  
								const char                             *theTag);
	int judgewin(int x, int y, unsigned int color);
	void drawqipan(CDC *pDC,CPoint point);
	void sendCommInteraction(const char *strMessage);
	void sendFedName(const char *myname);
	
    bool turnflag;
	int turnnum;
	unsigned int   qipan[15][15]; //存储棋子的颜色和坐标(根据数组下标算出)
	struct Fedmember
	{
		char fedname[20];
		unsigned int color;
	};
	Fedmember  fedmember[5];
	char commmessage[200];
	void sendResignMsg(char* myname);
	CWuziqiDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CWuziqiDlg)
	enum { IDD = IDD_WUZIQI_DIALOG };
	CComboBox	m_colorsel;
	CEdit	m_yourname;
	CString	m_Edityourname;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWuziqiDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	int m_fedcount;
	unsigned int qizicolor;
	char* const fedExecName;

	// Generated message map functions
	//{{AFX_MSG(CWuziqiDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnCreat();
	afx_msg void OnDetroy();
	afx_msg void OnJoin();
	afx_msg void OnResign();
	afx_msg void OnSelchangeComboColorsel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_WUZIQIDLG_H__06A3A9DA_7268_4136_92C8_15F766D656B1__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?