Article View: borland.public.cppbuilder.nativeapi
Article #6833Re: Paste Bitmap to Clipboard
From: Remy Lebeau (TeamB)
Date: Mon, 04 Apr 2005 17:51
Date: Mon, 04 Apr 2005 17:51
33 lines
2370 bytes
2370 bytes
"Bob" <Bob@NoSpam.com> wrote in message news:425123be@newsgroups.borland.com... > I created a DIB and it works fine now. Which you should have done anyway. According to MSDN: Clipboard Formats http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardformats.asp When copying bitmaps, it is best to place the CF_DIB or CF_DIBV5 format on the clipboard. This is because the colors in a device-dependent bitmap (CF_BITMAP) are relative to the system palette, which may change before the bitmap is pasted. If the CF_DIB or CF_DIBV5 format is on the clipboard and a window requests the CF_BITMAP format, the system renders the device-independent bitmap (DIB) using the current palette at that time. If you place the CF_BITMAP format on the clipboard (and not CF_DIB), the system renders the CF_DIB or CF_DIBV5 clipboard format as soon as the clipboard is closed. This ensures that the correct palette is used to generate the DIB. If you place the CF_DIBV5 format with the bitmap color space information in the clipboard, the system will convert the bitmap bits from the bitmap color space to the sRGB color space when CF_DIB or CF_DIBV5 is requested. If CF_DIBV5 is requested when there is no color space information in the clipboard, the system returns sRGB color space information in the BITMAPV5HEADER structure. Conversions between other clipboard formats occur upon demand. Gambit
Technical Details
Message-ID:
<42517e4f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<424ec137$1@newsgroups.borland.com> <425123be@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f3863d5f8dfe706b 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: <424ec137$1@newsgroups.borland.com> <425123be@newsgroups.borland.com> Subject: Re: Paste Bitmap to Clipboard Date: Mon, 4 Apr 2005 10:51:42 -0700 Lines: 35 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: 68.69.17.41 Message-ID: <42517e4f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112637007 68.69.17.41 (4 Apr 2005 10:50:07 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail