Sign in to follow this  
dmd_anfini

ID3DXFont::DrawText problem

Recommended Posts

Hi all, im having problems trying to compile a source using ID3DXFont::DrawText. The compiler replies with "no matching function for call to `ID3DXFont::DrawTextA(NULL, const char*&, uint&, tagRECT*&, int, D3DCOLOR)' " im using Dev-C++ 4.9.9.2 im including d3dx9core.h and it defines DrawText in this form STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; strangely, when i remove the first parameter, representing ID3DXSprite, it compiles i dont know whats happening, any suggestions?

Share this post


Link to post
Share on other sites
Sounds to me like you have an old SDK installed as well as the new one, and the compiler is using the old one. The sprite parameter wasn't in older SDKs.

Share this post


Link to post
Share on other sites
You're right. I don't know how, but a d3dx9core.h file was in the project directory. That file was from an old version of the sdk. Even having the latest sdk installed, the compiler first looks in the project directory and if he doesn't find the files he looks in the include paths configured for the project. I think was murphy. Thanks for the reply

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this