IGUIStaticText

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.
Post Reply
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

IGUIStaticText

Post by juliusctw »

I noticed that most of the gui takes wchar_t type, how would I read in wchar_t from a file as wchar_t and then input it into the IGUIStaticText ?

could i just read the data in as binary and cast it to wchar_t?
Gatekeeper
Posts: 31
Joined: Fri Apr 21, 2006 12:00 am
Location: Australia

Post by Gatekeeper »

Why not read the data in as a char* and then convert it to a stringw? Then you can use that to get a wchar.

Example:

Code: Select all

char buf[100];

blah blah blah

stringw text = buf;
IGUIStaticText statictext = env->addStaticText(text.c_str(), ...)

juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

you mean that actually works

Post by juliusctw »

i gotta try it... thanx
Post Reply