German:
Hallo Leute,
ich habe ein D3D9 Menü und die Items funktionieren auch wenn man sie auswählt aber da ist kein Text zusehen. Das Problem liegt an der Stelle:
Code:
char sTexto[1024] = "";
va_list ap;
if( !sNome || *sNome == '\0' )
return;
va_start( ap, sNome );
_vsnprintf_s( sTexto, 1024, 1023, sNome, ap );
va_end( ap );
RECT Posicao = { X, Y, X+500, Y+50 };
fonte->DrawText(NULL, sTexto, -1, &Posicao, DT_LEFT | DT_WORDBREAK, Cor);
Man kann nicht auf die Variable sTexo zugreifen, da sie LPWSTR sein muss deswegen habe ich folgenes hinzugefügt:
Code:
wchar_t Texto[1024];
mbstowcs(Texto, sTexto, strlen(sTexto));
LPWSTR endtext = Texto;
Nun ist sie umgewandelt aber irgendwo ist ein Fehler, da kein Text im Menü angezeigt wird.
ENGLISH:
Hey guys I've gotten an error. I got a D3D menu and this works but there is no text when I convert char to LPWSTR.
I tried to convert with the mbstowcs method
applied this:
Code:
wchar_t Texto[1024];
mbstowcs(Texto, sTexto, strlen(sTexto));
LPWSTR endtext = Texto;
But when I open the menu ingame I cant see the text but the Items are working. Where is the mistake?
Thanks for help,
Diiviision