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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
LischkeConnect With a Mentor Commented:
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
 
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
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
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
 
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
 
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
All Courses

From novice to tech pro — start learning today.