source: GTP/trunk/App/Demos/Illum/RayTraceEffects/Common/dxstdafx.h @ 755

Revision 755, 3.0 KB checked in by szirmay, 19 years ago (diff)

Added a folder remotely

Line 
1//--------------------------------------------------------------------------------------
2// File: DxStdAfx.h
3//
4// Desc: Header file that is the standard includes for the DirectX SDK samples
5//
6// Copyright (c) Microsoft Corporation. All rights reserved.
7//--------------------------------------------------------------------------------------
8#pragma once
9#ifndef DXSDK_STDAFX_H
10#define DXSDK_STDAFX_H
11
12#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
13#define STRICT
14
15// Works with Windows 2000 and later and Windows 98 or later
16#undef _WIN32_IE
17#undef WINVER
18#undef _WIN32_WINDOWS
19#undef _WIN32_WINNT
20#define WINVER         0x0500
21#define _WIN32_WINDOWS 0x0410
22#define _WIN32_WINNT   0x0500
23
24#include <windows.h>
25#include <assert.h>
26#include <wchar.h>
27#include <mmsystem.h>
28#include <commctrl.h> // for InitCommonControls()
29#include <shellapi.h> // for ExtractIcon()
30#include <new.h>      // for placement new
31#include <math.h>     
32#include <limits.h>     
33#include <stdio.h>
34
35// CRT's memory leak detection
36#if defined(DEBUG) | defined(_DEBUG)
37#include <crtdbg.h>
38#endif
39
40
41// Enable extra D3D debugging in debug builds if using the debug DirectX runtime. 
42// This makes D3D objects work well in the debugger watch window, but slows down
43// performance slightly.
44#if defined(DEBUG) | defined(_DEBUG)
45#define D3D_DEBUG_INFO
46#endif
47
48// Direct3D includes
49#include <d3d9.h>
50#include <d3dx9.h>
51#include <dxerr9.h>
52
53// DirectSound includes
54#include <mmsystem.h>
55#include <mmreg.h>
56#include <dsound.h>
57
58// strsafe.h deprecates old unsecure string functions.  If you
59// really do not want to it to (not recommended), then uncomment the next line and
60// comment out the following lines:
61
62//#define STRSAFE_NO_DEPRECATE
63#pragma deprecated(strncpy)
64#pragma deprecated(wcsncpy)
65#pragma deprecated(_tcsncpy)
66#pragma deprecated(wcsncat)
67#pragma deprecated(strncat)
68#pragma deprecated(_tcsncat)
69
70#include <strsafe.h>
71
72#include "DXUT.h"
73#include "DXUTmisc.h"
74#include "DXUTenum.h"
75#include "DXUTeffectmap.h"
76#include "DXUTmesh.h"
77#include "DXUTgui.h"
78#include "DXUTsettingsDlg.h"
79#include "DXUTSound.h"
80
81#if defined(DEBUG) | defined(_DEBUG)
82    #ifndef V
83        #define V(x)           { hr = x; if( FAILED(hr) ) { DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L#x, true ); } }
84    #endif
85    #ifndef V_RETURN
86        #define V_RETURN(x)    { hr = x; if( FAILED(hr) ) { return DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L#x, true ); } }
87    #endif
88#else
89    #ifndef V
90        #define V(x)           { hr = x; }
91    #endif
92    #ifndef V_RETURN
93        #define V_RETURN(x)    { hr = x; if( FAILED(hr) ) { return hr; } }
94    #endif
95#endif
96
97#ifndef SAFE_DELETE
98    #define SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
99#endif   
100#ifndef SAFE_DELETE_ARRAY
101    #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
102#endif   
103#ifndef SAFE_RELEASE
104    #define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
105#endif
106
107#endif // !defined(DXSDK_STDAFX_H)
Note: See TracBrowser for help on using the repository browser.