capplication.h
来自「Visual C++ 游戏开发与设计实例 源代码(所有)」· C头文件 代码 · 共 65 行
H
65 行
// CMAIN LIB - APPLICATION AND DIRECT WRAPPER
//
// Written by Mauricio Teichmann Ritter
//
// Copyright (C) 2002, Brazil. All rights reserved.
//
//
#include "stdafx.h"
#include "cWindow.h"
#ifndef _APPLIB_APPCLASS_
#define _APPLIB_APPCLASS_
class cApplication
{
protected:
LPSTR m_lpszAppName;
LPSTR m_lpszwndClassName;
DWORD m_ColorDepth;
DWORD m_ScreenHeight;
DWORD m_ScreenWidth;
public:
BOOL m_bActive;
void PreventFlip();
bool m_bDontFlip;
HWND GetMainWnd();
LPDIRECTDRAW7 GetDirectDraw();
LPDIRECTDRAW7 m_pDD;
LPDIRECTDRAWSURFACE7 m_pFrontBuffer;
LPDIRECTDRAWSURFACE7 m_pBackBuffer;
cApplication();
~cApplication();
static HINSTANCE m_hInst;
static HINSTANCE GetInstHandle() { return m_hInst; };
BOOL InitApplication();
BOOL RunApplication();
BOOL InitDirectX();
virtual void ExitApp();
virtual void DoIdle();
virtual void AppInitialized();
private:
cWindow m_pWindow;
};
cApplication* GetMainApp();
#ifdef _DEBUG
void Log(char* sFormat, ...);
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?