⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wuzidlg.h

📁 一个局域网的五子棋程序
💻 H
字号:
// wuziDlg.h : header file
//

#if !defined(AFX_WUZIDLG_H__8D9E1C3C_AAB0_4E3F_87F0_0774A2776E3A__INCLUDED_)
#define AFX_WUZIDLG_H__8D9E1C3C_AAB0_4E3F_87F0_0774A2776E3A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Node.h"

#include "GameSocket.h"	// Added by ClassView
#include "HestoryDlg.h"
/////////////////////////////////////////////////////////////////////////////
// CWuziDlg dialog

class CWuziDlg : public CDialog
{
// Construction
public:
	


	void CreateFolder();
	int shu;
	
	void GetParIp();
	struct hostent* phost;
	CString m_host;
	CString m_parip;
	void GetHost();
	
	void ShowMsg(CString str);
	COLORREF m_color;
	CBrush m_brush;
	void IsConnect(bool bl);
	
	void OnClose();
	NODE* GetNodeFromPoint(CPoint pt);

	void SetRecentNode(NODE* node);
	NODE* IsWin(NODE *pCur);
	void InitAllInfo();
	NODE* GetNode(CPoint pt);
	
afx_msg void OnConnect();
	void Send();
	void OnAccept();
	void OnReceive();
	void DrawGrid(int row,int col);
	CWuziDlg(CWnd* pParent = NULL);	// standard constructor
private:
	NODE nodes[11][11];
    int col;
    int row;
    int cx;
	int cy;
	int x ;
	int y ;
// Dialog Data
	//{{AFX_DATA(CWuziDlg)
	enum { IDD = IDD_WUZI_DIALOG };
	CIPAddressCtrl	m_IP;
	CStatic	m_curtime;
	CStatic	m_betime;
	CString	m_message;
	CString	m_show;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWuziDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CWuziDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnStart();
	afx_msg void OnSend();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnCut();
	
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CString m_time;
	BOOL m_IsServer;//判断是作为服务器还是客户机
	CString m_addr;
	CGameSocket m_cliensock;//作为客户机时的套接字
	CGameSocket m_serconsock;//作为服务器时的连接套接字
	CGameSocket m_sersock;//作为服务器时的监听套接字
	CPoint m_Endpt;
	CPoint m_Startpt;
	BOOL m_IsDown;
	BOOL m_IsStart;
	BOOL m_IsWin;
	bool m_run;
};

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

#endif // !defined(AFX_WUZIDLG_H__8D9E1C3C_AAB0_4E3F_87F0_0774A2776E3A__INCLUDED_)

⌨️ 快捷键说明

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