|
|
//程式的header如此?s出?很多的warning,但是?绦惺强梢猿晒Φ
//我?掉所有的warning,???如何做
//?是一??DirectX9.0的?例我想加入MFC,include <afxwin.h>
#ifndef __d3dUtilityH__
#define __d3dUtilityH__
#include <afxwin.h>
#pragma warning(disable: 4786)
#pragma warning(disable: 4663)
#pragma warning(disable: 4018)
#pragma warning(disable: 4100)
#include <d3dx9.h>
#include <string>
#include <mmsystem.h>
namespace d3d
{
bool InitD3D(
HINSTANCE hInstance, // [in] Application instance.
int width, int height, // [in] Backbuffer dimensions.
bool windowed, // [in] Windowed (true)or full screen (false).
D3DDEVTYPE deviceType, // [in] HAL or REF
IDirect3DDevice9** device);// [out]The created device.
int EnterMsgLoop(
bool (*ptr_display)(float timeDelta));
LRESULT CALLBACK WndProc(
HWND hwnd,
Uint msg,
WPARAM wParam,
LPARAM lParam);
template<class T> void Release(T t)
{
if( t )
{
t->Release();
t = 0;
}
}
template<class T> void Delete(T t)
{
if( t )
{
delete t;
t = 0;
}
}
}
#endif // __d3dUtilityH__
/////
出?的warning如下
Compiling...
d3dInit.cpp
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : warning C4663: C++ language change: to explicitly specialize class template 'ctype' use the following syntax:
template<> class ctype<char> ...
|
|