Article View: borland.public.cppbuilder.nativeapi
Article #14866Re: RTF to plain text
From: Dmitry Mikhilov
Date: Tue, 29 Jul 2003 10:28
Date: Tue, 29 Jul 2003 10:28
29 lines
2138 bytes
2138 bytes
As you have guessed, I'm not going to launch WordPad from my application when I need to do such a conversion :) Dynamic creation of "fake" TRichEdit component, filling it with incoming RTF stream, removing the formatting and saving the result came to my mind first, by seemed to be a little bit non-elegant... I guessed that there may be direct calls to some WIN API functions an/or some other ways to perform conversion... What I actually need is filling some fields of TListView with first non-blank lines of incoming ICQ messages which may be in RTF. It should be done quickly and efficiently... Dmitry "JD" <nospam@nospam.com> wrote: news:3f26442d$1@newsgroups.borland.com... > > "Dmitry Mikhilov" <dm1@fromru.com> wrote: > > > >What is the most natural way to convert RTF to plain text? > > > > You'll need to be more specific. One solution is to load the > file using WordPad and Cut-N-Paste into NotePad but I'm > guessing that you already knew that and it's not what you want. > > If you want to do it programatically, try loading the file > into a RichEdit, removing the formatting and saving. > > ~ JD >
Technical Details
Message-ID:
<3f264bed@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f263c4b@newsgroups.borland.com> <3f26442d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2d859c765139b26e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-29 03:40:32 PST From: "Dmitry Mikhilov" <dm1@fromru.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f263c4b@newsgroups.borland.com> <3f26442d$1@newsgroups.borland.com> Subject: Re: RTF to plain text Date: Tue, 29 Jul 2003 14:28:30 +0400 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 195.242.17.103 Message-ID: <3f264bed@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059474413 195.242.17.103 (29 Jul 2003 03:26:53 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail