Loading clipboard from a dowmloaded stream.

I have Win98 and D4 using ICS HttpClient and would like to see an example of how to load a bitmap directly to the clipboard from a received stream of a bitmap.
Delphi3
LVL 4
delphi3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LischkeCommented:
Hi Delphi3,

if you have your image data only in the stream then you need to load it into a TBitmap. The next step is then easy:

  Clipboard.Assign(MyBitmap);

Ciao, Mike
0
delphi3Author Commented:
Mike,
I know that the data from the http is a bitmap a head of time
But I have been thinking that it would be loaded to the disk on the use of 'Form1.get'. I want to intercept  the bitmap before it gets to the disk.  Thinking that the clipboard has the various formats I want the bitmap loaded to the clipboard instead. In other words I can't assign it directly from the stream, Can I?
I hope that this makes sense.

Delphi3  
0
LischkeCommented:
If you want the image data recognized as a normal bitmap then you have to store it as such. There's no clipboard format of type raw image data (at least no official one). What do you want with the data on the clipboard?

Ciao, Mike
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

delphi3Author Commented:
Mike,
This Question has its roots in showing a string directly from a stream that skips the step of putting it on the disk before viewing. I  asked a question earlier if I could get it to happen with a xxx.bmp too! But that does not work.
So I read that I could put it the xxx.bmp first into the clipboard as a load from stream, then I could paste it on to the form1.image1.picture.graphic.
So the answe is no?

Delphi3
0
LischkeCommented:
That's the point. A string is very different in this regard as it is a type which is natively supported by the clipboard. A raw bitmap is not while a HBitmap (also a bitmap handle from a correctly loaded bitmap) is supported. But you need to load the bitmap in this scenario first.

Hence the answer is no. You cannot load a raw bitmap as it is stored in a stream or file to the clipboard.

Ciao, Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
delphi3Author Commented:
Mike,
Thanks for info.
Do you want the points for this info? If no, I will delete this question.

Delphi3
0
delphi3Author Commented:
Hi  Mike,
You deserve the points even if the answer is no, that it can't be done. Thanks for connecting to this problem.
I'll leave the answer here for sharing to the rest of the EE group that may have it in their head to ask a question like this.

Have a good weekend.

Delphi3
0
LischkeCommented:
Thank you Delphi3. At least a few new information went to you, I hope :-)

Ciao, Mike
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.