🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internationalization
Article #272

Re: Multi language support with RC file

#272
From: Baz
Date: Sat, 16 Oct 2004 17:00
15 lines
1534 bytes
> HINSTANCE hRes=(HINSTANCE)FindResourceHInstance((unsigned)HInstance);
> AnsiString s = AnsiString::LoadStr(hRes,MY_DLL_STRING1);
> ShowMessage(s);
>
Try this:
  UTF8String s=AnsiString::LoadStr(MY_DLL_STRING1);
  WideString w=UTF8Decode(s);  // convert UTF8 to WideString
  ShowMessage(w);    // WideString version of ShowMessage

Notes:
I assume the project is CLX under BCB6.
Borland typedef UTF8String to AnsiString in sysmac.h (it's the same thing).
The ShowMessage(w) will be the WideString version.
I also add #include <tchar.h> and add _UNICODE to the project options
conditional defines to allow _TEXT() or _T() macros.
Technical Details
Message-ID: <417153a6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <416ba1f3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10297d,afc63d63b99e1071
X-Google-Attributes: gid10297d,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Baz" <baz@NOSPAM.com>
Newsgroups: borland.public.cppbuilder.internationalization
References: <416ba1f3$1@newsgroups.borland.com>
Subject: Re: Multi language support with RC file
Date: Sat, 16 Oct 2004 18:00:23 +0100
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 82.152.70.102
Message-ID: <417153a6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097946022 82.152.70.102 (16 Oct 2004 10:00:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail