cApplication.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- // 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