BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TBitmap to clipboard?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Bob Reeves
Guest





PostPosted: Fri Apr 06, 2007 7:45 pm    Post subject: TBitmap to clipboard? Reply with quote



Looked at the CopyToClipboard() sample in Help but it sure looks like it
doesn't give one everything one needs to be able to actually use it. I need
to copy a simple two color bitmap to the clipboard in bitmap format.

Anyone have a working sample?

Thanks
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Apr 06, 2007 9:08 pm    Post subject: Re: TBitmap to clipboard? Reply with quote



"Bob Reeves" <bob (AT) somethinxtra (DOT) com> wrote in message
news:46166c0a$1 (AT) newsgroups (DOT) borland.com...

Quote:
Looked at the CopyToClipboard() sample in Help but it sure
looks like it doesn't give one everything one needs to be able
to actually use it.

CopyToClipboard() is a method of TCustomEdit. It has nothing to do
with bitmaps.

Quote:
I need to copy a simple two color bitmap to the clipboard in bitmap
format.


Simply Assign() the TBitmap to the global TClipboard object, ie:

#include <ClipBrd.hpp>

Clipboard()->Assign(MyBitmap);


Gambit
Back to top
Bob Reeves
Guest





PostPosted: Fri Apr 06, 2007 10:29 pm    Post subject: Re: TBitmap to clipboard? Reply with quote



Thanks,

Might be because I am still using Builder 4 but TGraphic has a
SaveToClipboardFormat() Method which I was referring to but left out the
Format part. Thought this was what I was looking for but you have shown me
the way..

Thanks again
Bob
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sat Apr 07, 2007 12:30 am    Post subject: Re: TBitmap to clipboard? Reply with quote

"Bob Reeves" <bob (AT) somethinxtra (DOT) com> wrote in message
news:4616928e$1 (AT) newsgroups (DOT) borland.com...

Quote:
Might be because I am still using Builder 4 but TGraphic has
a SaveToClipboardFormat() Method which I was referring to

TClipboard::Assign() calls that method internally for you.

Quote:
Thought this was what I was looking for

It is, sort of. SaveToClipboardFormat() prepares the bitmap data for
storage on the clipboard, but does not actually open the clipboard and
store it. You have to pass the returned handles to the Win32 API
SetClipboardData() function (which TClipboard does for you).


Gambit
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.