UniversalC
02/10/2005, 02h20
Salut
J'ai un petit programme C++ / Directx9, sous DevCpp. J'essaie d'afficher mon "Hello world" !! mais impossible, pourtant j'ai suivi ce tutorial : http://www.toymaker.info/Games/html/text.html
Voici la ligne qui pose pb :
D3DXCreateFont(lpDirect3DDevice9, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &m_font );
Et l'erreur :
104 H:\cpp\street\main.cpp invalid conversion from `int' to `HFONT__*'
Apparemment, la fonction dans mon header (d3dx9core.h) n'attend pas les memes parametres que la fonction decrite dans le MSDN !!
DAns mon header :
HRESULT WINAPI
D3DXCreateFont(
LPDIRECT3DDEVICE9 pDevice,
HFONT hFont,
LPD3DXFONT* ppFont);
J'ai un petit programme C++ / Directx9, sous DevCpp. J'essaie d'afficher mon "Hello world" !! mais impossible, pourtant j'ai suivi ce tutorial : http://www.toymaker.info/Games/html/text.html
Voici la ligne qui pose pb :
D3DXCreateFont(lpDirect3DDevice9, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &m_font );
Et l'erreur :
104 H:\cpp\street\main.cpp invalid conversion from `int' to `HFONT__*'
Apparemment, la fonction dans mon header (d3dx9core.h) n'attend pas les memes parametres que la fonction decrite dans le MSDN !!
DAns mon header :
HRESULT WINAPI
D3DXCreateFont(
LPDIRECT3DDEVICE9 pDevice,
HFONT hFont,
LPD3DXFONT* ppFont);