🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2277

Re: Problems with resource strings.

#2277
From: Remy Lebeau (TeamB)
Date: Mon, 19 Mar 2007 21:22
23 lines
1712 bytes
"A Nonymous" <anonymous@hotmail.com> wrote in message
news:Xns98F872A803C84anonymoushotmailcom@207.105.83.66...

> Since my app is written in C++ I tried to implement it in C++
> but ran into this problem.  This version doesn't error, but will
> not load the Label-> Caption.

It is loading the string data just fine, but you are not actually
assigning the data to the Caption property.  That is why it remains
empty.  You are calling the Caption property's getter method to
receive a temporary AnsiString, and then you are calling LoadString()
on that temporary, but you are not assigning the temporary back to the
property afterwards.  You need to change this:

    Label->Caption.LoadString(hlib,1);

To this instead:

    Label->Caption = AnsiString().LoadString(hlib,1);


Gambit
Technical Details
Message-ID: <45fef11d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <Xns98F872A803C84anonymoushotmailcom@207.105.83.66>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,714830e17a60e95b
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <Xns98F872A803C84anonymoushotmailcom@207.105.83.66>
Subject: Re: Problems with resource strings.
Date: Mon, 19 Mar 2007 13:22:08 -0800
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.34.171
Message-ID: <45fef11d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1174335773 75.83.34.171 (19 Mar 2007 13:22:53 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail