   directx font issues
  I'm trying to display some english text but when I render it I get chinese characters. What params do I need to change/set? Below is what I currently have:...D3DXFONT_DESC fontDesc;fontDesc.Height = 20;fontDesc.Width = 10;fontDesc.Weight = FW_NORMAL;fontDesc.MipLevels = 0;fontDesc.Italic = false;fontDesc.CharSet = DEFAULT_CHARSET;fontDesc.OutputPrecision = OUT_DEFAULT_PRECIS;fontDesc.Quality = DEFAULT_QUALITY;fontDesc.PitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;_tcscpy( fontDesc.FaceName, _T("Times New Roman") );HRESULT Result = D3DXCreateFontIndirect( d3ddev, &fontDesc, &FontData );...std::string wtf( "testing" );RECT hi;hi.left = 0;hi.top = 0;hi.bottom = fontDesc.Height;hi.right = fontDesc.Width * wtf.size();FontData->DrawText( 0, (LPCWSTR)(wtf.c_str()), -1, &hi, DT_LEFT, D3DCOLOR_XRGB( 255, 0, 0 ) );Note that I just get an error when I replace (LPCWSTR)(wtf.c_str()) with _T(wtf.c_str()) - I get 'Lwtf' : undeclared identifier. Stupid macros...Also, I'm getting Result as D3D_OK.[Edited by - 16bit_port on April 12, 2010 9:10:47 PM]
  You can't convert an ansi string to a unicode string just by casting it, you either need to use one of the APIs for doing so or use wstring instead...std::wstring wtf( "testing" );;Read this.   ;  jbb, thanks, it worked, however I had to change it to std::wstring wtf( L"testing" );to get it to work.EvilSteve, thanks for the link. It was very informative.   