Article View: borland.public.cppbuilder.nativeapi
Article #15977Re: Reading clipboard formats
From: Remy Lebeau (TeamB)
Date: Thu, 05 Jun 2003 23:40
Date: Thu, 05 Jun 2003 23:40
19 lines
1518 bytes
1518 bytes
"Chris" <Chris8852@adelphia.net> wrote in message
news:3edfd042$1@newsgroups.borland.com...
> When using
> TImage->Picture->Bitmap->Assign(Clipboard());
> Is there any way to tell it to choose CF_DIB over CF_BITMAP?
TBitmap has a LoadFromClipboardFormat() method for that. Use
TClipboard::GetAsHandle() first and then pass the data to
TBitmap::LoadFromClipboardFormat(), ie:
if( Clipboard()->HasFormat(CF_DIB) )
Image1->Picture->Bitmap->LoadFromClipboardFormat(CF_DIB,
Clipboard()->GetAsHandle(CF_DIB), NULL);
else
Image1->Picture->Bitmap->Assign(Clipboard());
Gambit
Technical Details
Message-ID:
<3edfd439@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edfd042$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ffc98a5b3b8ea52c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-05 16:41:58 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edfd042$1@newsgroups.borland.com> Subject: Re: Reading clipboard formats Date: Thu, 5 Jun 2003 16:40:37 -0700 Lines: 21 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: 207.175.226.26 Message-ID: <3edfd439@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054856249 207.175.226.26 (5 Jun 2003 16:37:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail