Jump to content
  • Advertisement
Sign in to follow this  
dmd_anfini

ID3DXFont::DrawText problem

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!