> My application places a bitmap onto the clipboard using
> SetClipboardData. The bitmap is copied in both the CF_BITMAP and CF_DIB
> formats, and it can be pasted into Microsoft Paint, Wordpad, and pretty
> much any other application. However, it cannot be pasted into
> Powerpoint.
How are you doing this, what do you expect to happen, what's happening instead,
and in what version of PPT?
> Does Powerpoint not recognize the plain old bitmap format on the
> clipboard?
It does. Press Alt+PrtScrn, switch to PPT and choose Edit, Paste Special.
That'll show you a list of the clipboard formats PPT recognizes as "pasteable".
DIB and Bitmap will almost certainly be on the list.
Try the same thing after your application puts an image on the clipboard. Are
they still there?
>Is there some other format that I should copy the bitmap to
> the clipboard as?
There should be no need for that.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Kaushik Sridharan - 21 Jun 2006 09:46 GMT
Okay, I have some more insight on the problem.
My application copies the bitmap to the clipboard in three formats:
CF_DIB, CF_BITMAP and CF_HTML. In the HTML case, there's just some text
and a link to a locally saved copy of the bitmap.
Powerpoint can paste the image if I only place the CF_DIB and CF_BITMAP
formats on the clipboard. It cannot paste it if I also include the
CF_HTML format. However, I can paste it if I select Paste Special and
then choose one of the bitmap formats.
Apparently, Powerpoint cannot paste the the HTML format that's placed
in the clipboard. Furthermore, it tries to paste the HTML format (and
fails) even though the bitmap formats are also available. I tried this
on Powerpoint 2003 SP1, by the way.
The workaround is to always chose Paste Special, but I'd prefer if just
Paste also were to work. Any ideas?
-K
> > My application places a bitmap onto the clipboard using
> > SetClipboardData. The bitmap is copied in both the CF_BITMAP and CF_DIB
[quoted text clipped - 26 lines]
> PPTools: www.pptools.com
> ================================================
Steve Rindsberg - 21 Jun 2006 20:23 GMT
> Okay, I have some more insight on the problem.
>
[quoted text clipped - 6 lines]
> CF_HTML format. However, I can paste it if I select Paste Special and
> then choose one of the bitmap formats.
Good info ... thanks.
Apps can choose which of the various clipboard formats they want to use by default.
Apparently given the choice of DIB/Bitmap or HTML, PPT likes the HTML but expects
different info from what your app supplies. Since you can't change PPT, you may
have to have your app pop only the bitmap formats up there.
> Apparently, Powerpoint cannot paste the the HTML format that's placed
> in the clipboard. Furthermore, it tries to paste the HTML format (and
[quoted text clipped - 36 lines]
> > PPTools: www.pptools.com
> > ================================================
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
skaushik@hotmail.com - 21 Jun 2006 22:22 GMT
Yeah, that seems to be the problem. It is unfortunate that Powerpoint
does not try the bitmap formats when the HTML paste fails. Also, the
order in which the formats are placed on the clipboard seem to have no
bearing on the priority used by Powerpoint.
Thanks for your response. This is the app I am talking about btw:
http://bhelpuri.net/Snippy/
-K
> > Okay, I have some more insight on the problem.
> >
[quoted text clipped - 60 lines]
> PPTools: www.pptools.com
> ================================================
Steve Rindsberg - 22 Jun 2006 02:19 GMT
> Yeah, that seems to be the problem. It is unfortunate that Powerpoint
> does not try the bitmap formats when the HTML paste fails. Also, the
> order in which the formats are placed on the clipboard seem to have no
> bearing on the priority used by Powerpoint.
Nope, that's not how it works. It's left to each app to decide what clipboard formats
it wants to favor and in what order.
> Thanks for your response. This is the app I am talking about btw:
>
> http://bhelpuri.net/Snippy/
Looks like a cute little app. Have you considered doing some screenshots and such for
Trixie? The descriptions may make sense to someone who uses the comparable features in
Firefox but otherwise ... sitting there scratching my head.
> -K
>
[quoted text clipped - 62 lines]
> > PPTools: www.pptools.com
> > ================================================
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================