app_frame.h
来自「俄罗斯方块 采用MFC和GDI+编写的,自己感觉写得不是很好,不过看上去还行」· C头文件 代码 · 共 73 行
H
73 行
#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 + =
减小字号Ctrl + -
显示快捷键?