| View previous topic :: View next topic |
| Author |
Message |
Borut Guest
|
Posted: Mon Apr 19, 2004 9:25 pm Post subject: wchar_t |
|
|
Hello!
How to convert AnsiString to wchar_t?
Is it posible this :
wchar_t xx = "blablabla";
Thx in advance
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Apr 19, 2004 11:06 pm Post subject: Re: wchar_t |
|
|
"Borut" <borut (AT) bokosoft (DOT) si> wrote
| Quote: | How to convert AnsiString to wchar_t?
|
Use a WideString.
| Quote: | Is it posible this :
wchar_t xx = "blablabla";
|
wchar_t *xx = L"blablabla";
But it only works for string literals. If you have an AnsiString or char*
string, you have to convert to wchar_t* dynamically at runtime, either by 1)
using WideString, 2) using AnsiString::WideCharBufSize() and
AnsiString::WideChar(), or 3) calling MultiByteToWideChar() directly.
Gambit
|
|
| Back to top |
|
 |
Ioannis Vranos Guest
|
Posted: Tue Apr 20, 2004 12:41 am Post subject: Re: wchar_t |
|
|
"Borut" <borut (AT) bokosoft (DOT) si> wrote
| Quote: | Hello!
How to convert AnsiString to wchar_t?
|
I haven't coded in VCL but i guess yes.
| Quote: | Is it posible this :
wchar_t xx = "blablabla";
|
wchar_t xxx=L"blablabla";
L designates a wchar _t literal.
Ioannis Vranos
|
|
| Back to top |
|
 |
|