🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how can use ascii dos charset in memo control?

#11733
From: Michel Leunen
Date: Wed, 21 Jan 2004 20:35
21 lines
1919 bytes
ScOe wrote:

>         while (in) {
>             in.getline(str, 255);
>             char *szTemp = strdup (str);
>             CharToOem(str, szTemp);
>             Form1->RichEdit1->Lines->Add (szTemp);
>             }

This is not relevant to your problem but if you use strdup(), you have 
to release the memory yourself. Add a free(szTemp) in your loop 
otherwise you're leaking memory each time the loop is exeuted.

Michel
-- 
----------------------------------------
Michel Leunen
mailto:michel@leunen.com
C++Builder, C++BuilderX, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Technical Details
Message-ID: <400ee289$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <400b17b7@newsgroups.borland.com> <vram00dvjm1cn0bpddhafucohai2hd1dsg@4ax.com> <400bdd21@newsgroups.borland.com> <m2vfn7n9or.fsf@madbox2.local> <400d75ca@newsgroups.borland.com> <m2wu7mgvvc.fsf@madbox2.local> <400e7421@newsgroups.borland.com> <400e7ca9$1@newsgroups.borland.com> <400ec9cf@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2a43cf053fcca89
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-21 12:40:29 PST
Date: Wed, 21 Jan 2004 21:35:19 +0100
From: Michel Leunen <mleu@STOPSPAMskynet.be>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: how can use ascii dos charset in memo control?
References: <400b17b7@newsgroups.borland.com> <vram00dvjm1cn0bpddhafucohai2hd1dsg@4ax.com> <400bdd21@newsgroups.borland.com> <m2vfn7n9or.fsf@madbox2.local> <400d75ca@newsgroups.borland.com> <m2wu7mgvvc.fsf@madbox2.local> <400e7421@newsgroups.borland.com> <400e7ca9$1@newsgroups.borland.com> <400ec9cf@newsgroups.borland.com>
In-Reply-To: <400ec9cf@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.240.67.37
Message-ID: <400ee289$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074717321 81.240.67.37 (21 Jan 2004 12:35:21 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail