If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
StuCollier
Posts: 52 Joined: Tue Mar 30, 2004 12:16 pm
Post
by StuCollier » Wed Apr 14, 2004 1:45 pm
Code: Select all
void StaticTextChange( char *addtext )
{
wchar_t msg[20];
swprintf(msg, 20, L"%s", addtext);
StaticTextPtr->setText(msg); // static text
}
Why does this create little squares in the statictextbox ?
What have I missed ?
StuCollier
Posts: 52 Joined: Tue Mar 30, 2004 12:16 pm
Post
by StuCollier » Wed Apr 14, 2004 2:00 pm
I found that swprintf works fine for converting number or constant text
Ive now found ....
which works fine..... be interested to know why swprinf doesnt
lilo
Post
by lilo » Wed Apr 14, 2004 5:31 pm
hi
swprintf works fine! you just need to make 'addtext' a pointer to wchar_t rather than char
yin nadie
Posts: 43 Joined: Wed Mar 31, 2004 1:03 pm
Location: Seville, Spain
Contact:
Post
by yin nadie » Wed Apr 14, 2004 5:49 pm
for me, swprintf tends to work awfully bad when compiling under windows, and perfectly well under linux.
In windows, i always get those pretty (as hell) squares
Tyn
Posts: 932 Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:
Post
by Tyn » Wed Apr 14, 2004 6:42 pm
Hmm, that sounds like the correct character isn't being used, I don't know why it would do that. Sounds pretty erratic. Do you recon it could be loading the wrong character set?