Article View: borland.public.cppbuilder.nativeapi
Article #13086Re: Content missing when using clipboard API calls
From: Kris
Date: Sun, 26 Oct 2003 12:31
Date: Sun, 26 Oct 2003 12:31
46 lines
2545 bytes
2545 bytes
The reason why I wasn't using ->AsString is because the code I have shown is only a part of a bigger whole. In fact, I will also be putting up Rich Text and HTML content on the clipboard. I have been using RichEdit->CopyToClipboard() but this only puts RichEdit and Plain Text content on the clipboard and I had noticed that outlook (expresss) does a really poor job of preserving the formatting when importing RTF-content from the clipboard. If I also offer HTML content outlooks behaves much better when pasting. This by the way leads to my next question for which I have created a new thread. Thanks, BTW As Bob Gonder suggested in the other response I have added a trailing zero and everything is OK now. On Sat, 25 Oct 2003 01:28:43 -0700, "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> wrote: > >"Kris" <myEmail@email.com> wrote in message >news:cq9kpv03v7gookvn5ao482qv0bl7352eva@4ax.com... > >> When executing the code below and putting the data contained in >> TEXT_ClipboardData (which is "PLAIN TEXT SAMPLE") I will only get >> "PLAIN TEXT SAMPL" (i.e. the last char is missing). > >Since you are using the VCL anyway, you could just use the >TClipboard::AsString property instead: > > #include <clipbrd.h> > > Clipboard()->AsString = "PLAIN TEXT SAMPLE"; > >If that still exhibits the same problem, then the fault is in the receiving >application that is pasting the text, not in the code that is copying the >text to the clipboard (where exactly are you pasting the text, anyway?). > > >Gambit >
Technical Details
Message-ID:
<t8fnpvonnkgddphirje009m449j0e49379@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<cq9kpv03v7gookvn5ao482qv0bl7352eva@4ax.com> <3f9a339b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8c9761db6f386d91 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-26 04:39:03 PST From: Kris <myEmail@email.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Content missing when using clipboard API calls Date: Sun, 26 Oct 2003 13:31:30 +0100 Message-ID: <t8fnpvonnkgddphirje009m449j0e49379@4ax.com> References: <cq9kpv03v7gookvn5ao482qv0bl7352eva@4ax.com> <3f9a339b$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 212.239.132.177 X-Trace: newsgroups.borland.com 1067171480 212.239.132.177 (26 Oct 2003 04:31:20 -0700) Lines: 47 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail