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

📄 app_frame.h

📁 俄罗斯方块 采用MFC和GDI+编写的,自己感觉写得不是很好,不过看上去还行
💻 H
字号:

#pragma once
#include "resource.h"
#include "gdiplus.h"

#include "Game.h"

using namespace Gdiplus;

#ifndef __AFXWIN_H__
	#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
#endif

class CTrixApp: public CWinApp
{
public:
		BOOL InitInstance();
		DECLARE_MESSAGE_MAP()
};

class CTrixView : public CView
{
	DECLARE_DYNCREATE(CTrixView)
	virtual void OnDraw(CDC *pDC);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
public:
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	INT_PTR ID_TIMER;
};

class CTrixDoc : public CDocument
{
	DECLARE_DYNCREATE(CTrixDoc)

	DECLARE_MESSAGE_MAP()
public:
	virtual void Serialize(CArchive &ar);
};

class CTrixFrame : public CFrameWnd
{
	DECLARE_DYNCREATE(CTrixFrame)
	
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	virtual BOOL PreCreateWindow(CREATESTRUCT &cs);
	DECLARE_MESSAGE_MAP()
private:
	
public:
	CTrixFrame();
	~CTrixFrame();

	
public:
	GdiplusStartupInput in;
	ULONG_PTR token;
	DWORD size;
	DOCINFO docInfo;


public:
	afx_msg void OnClose();
//	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
//	afx_msg void OnPaint();
public:
	afx_msg void OnExit();
	afx_msg void OnGameRestrat();
	afx_msg void OnHelpAbout();
};

⌨️ 快捷键说明

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