BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

wchar_t

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Borut
Guest





PostPosted: Mon Apr 19, 2004 9:25 pm    Post subject: wchar_t Reply with quote



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





PostPosted: Mon Apr 19, 2004 11:06 pm    Post subject: Re: wchar_t Reply with quote




"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





PostPosted: Tue Apr 20, 2004 12:41 am    Post subject: Re: wchar_t Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.