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

📄 main.h

📁 <B>很多DirectX 9.0游戏编程源码例子</B>
💻 H
字号:
//-----------------------------------------------------------------------------
// Name: D3DFrame_TitleScreen
//
// Description: Example code showing how to create a simple application
//				that starts out by displaying a title screen.
//
// File Function: Header file containing header information (main.h)
//
// Code: 
//		Copyright (c) 2002 LostLogic Corporation. All rights reserved.
//
// Libraries Required:
//		d3d9.lib dxguid.lib d3dx9dt.lib d3dxof.lib comctl32.lib	winmm.lib
//
// DX Files Required:
//		d3dapp.cpp
//		d3denumeration.cpp
//		d3dfont.cpp
//		d3dsettings.cpp
//		d3dutil.cpp
//		dxutil.cpp
//
// Local Files Required:
//		resourcedata.rc
//		main.cpp
//		main.h
//
// Original D3D Application Shell Code: 
//		Copyright (c) 1997-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#define STRICT
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
#include <math.h>
#include <tchar.h>
#include <stdio.h>
#include <D3DX9.h>
#include "DXUtil.h"
#include "D3DEnumeration.h"
#include "D3DSettings.h"
#include "D3DApp.h"
#include "D3DFont.h"
#include "D3DUtil.h"

//-----------------------------------------------------------------------------
// Desc: Application class. The base class (CD3DApplication) provides the 
//       generic functionality needed in all Direct3D samples. CD3DFramework 
//       adds functionality specific to this sample program.
//-----------------------------------------------------------------------------
class CD3DFramework : public CD3DApplication
{
    // Font to display FPS and video info
	CD3DFont*				m_pStatsFont;
	// Buffer to hold textures
	LPDIRECT3DTEXTURE9      m_pTexture[ 32 ];
	// Window dimensions
	short					m_shWindowWidth;
	short					m_shWindowHeight;

	// Sprite Device
	LPD3DXSPRITE			pd3dxSprite;

protected:
    HRESULT OneTimeSceneInit();
    HRESULT InitDeviceObjects();
    HRESULT RestoreDeviceObjects();
    HRESULT InvalidateDeviceObjects();
    HRESULT DeleteDeviceObjects();
    HRESULT Render();
    HRESULT FinalCleanup();
    HRESULT CreateD3DXTextMesh( LPD3DXMESH* ppMesh, TCHAR* pstrFont, DWORD dwSize );
	// Display sprite on-screen
	HRESULT BltSprite( RECT *pDestRect, LPDIRECT3DTEXTURE9 pSrcTexture, RECT *pSrcRect );

public:
    LRESULT MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
    CD3DFramework();
};


⌨️ 快捷键说明

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