Jump to content
  • Advertisement
Sign in to follow this  

Text in Direct 9

This topic is 3578 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

hello friends and thanks for read, look Im working with Direct9 and Visual studio 2005,Ive initialized the direct successfully and now Im attempting to draw some text in te DirectWindow, I have and example from the book "Introduction to 3D Game with Direct 9." but it dont work and I dont know how to fix it. the code is... /*...*/ LOGFONT lf; ZeroMemory(&lf, sizeof(LOGFONT)); lf.lfHeight = 25; lf.lfWidth = 12; lf.lfWeight = 500; lf.lfItalic = false; lf.lfUnderline = false; lf.lfStrikeOut = false; lf.lfCharSet = DEFAULT_CHARSET; strcpy(lf.lfFaceName, "Times New Roman"); //here is the ERROR ID3DXFont* font = 0; D3DXCreateFontIndirect(Device, &lf, &font); /*...*/ and the error is error C2664: 'strcpy' : cannot convert parameter 1 from 'WCHAR [32]' to 'char *' please help me...

Share this post


Link to post
Share on other sites
Advertisement
Use wstrcpy(). Your project is configured to use wide strings, unicode. What you want is to either use ascii strings by default (change your project settings) or use the wide variant of the function.

Share this post


Link to post
Share on other sites
hi and thanks for answer but I type wstrcpy and the compiler dont identific that function, so how I can change the properties of my project for make work the wstrcpy(lf.lfFaceName, "Times New Roman") comand??

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!