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

📄 tedlg.h

📁 俄罗斯方块,带背景音乐,带扩展窗口,操作同qq游戏的疯狂俄罗斯
💻 H
字号:
// TEDlg.h : header file
//

#if !defined(AFX_TEDLG_H__8CD6C67A_33F7_4FB8_B393_79DA91025CC4__INCLUDED_)
#define AFX_TEDLG_H__8CD6C67A_33F7_4FB8_B393_79DA91025CC4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MAX_LENGTH      256
#define ONE   18
#define midx  420
#define midy  340
#define TWO   9

#define UDP_PORT		7000

#define SER_MESSAGE WM_USER + 100
#define CLI_MESSAGE WM_USER + 101

#define UDP_C_SOCK    WM_USER + 111
#define UDP_S_SOCK	  WM_USER + 112

#include "Server.h"
#include "Client.h"
#include"edge.h"
#include"model.h"
#include <afxtempl.h>
/////////////////////////////////////////////////////////////////////////////
// CTEDlg dialog

class CTEDlg : public CDialog
{
// Construction
public:
	CTEDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTEDlg)
	enum { IDD = IDD_TE_DIALOG };
	CString	m_state;
	//}}AFX_DATA
	void Graph();
	void DrawEdge();

	int  GetDown(Edge *edge,Model *model,int color);
	int  GameOver();
	void Movie(int *locate,int *objm,int color,int pat,int style);
	void GetScore(int score);
	void DrawModel(Model *mod,int x, int y,int color);

	void SetUDPserver(); 
	BOOL PreTranslateMessage(LPMSG lpmsg);
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTEDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
	Edge  *TheEdge;
	Model *Model_First;
	Model *Model_Next;
	int color;
	int next_color; 
	BOOL Start;

	UINT	m_uPort;
	CString HostData;
	CServer m_server;
	CClient m_client;

	int m_Last_Music;		//上一次选择的音乐;

	MCI_GENERIC_PARMS m_CloseParms;
	MCI_OPEN_PARMS m_OpenParms;
	MCI_PLAY_PARMS m_PlayParms;

	char* m_Music[6];
// Implementation
protected:
	HICON m_hIcon;
	BOOL BroadSend(TCHAR* ,SOCKET,UINT);

	UINT_PTR	m_nTimer;
	void Sigle(int x,int y,int style,int color);
	int *makeup;
	int *location;
	int HEADX;
	int HEADY;
	// Generated message map functions
	//{{AFX_MSG(CTEDlg)
	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 OnTimer(UINT nIDEvent);

	afx_msg void OnCloseMusic();
	afx_msg void OnMusic1();
	afx_msg void OnMusic2();
	afx_msg void OnMusic3();
	afx_msg void OnMusic4();
	afx_msg void OnMusic5();
	afx_msg void OnMusic6();

	afx_msg LRESULT OnRev(WPARAM wParam, LPARAM lParam);

	afx_msg LRESULT OnSer(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_TEDLG_H__8CD6C67A_33F7_4FB8_B393_79DA91025CC4__INCLUDED_)

⌨️ 快捷键说明

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