Board index » delphi » ClipBoard + TMemoryStream?
Mitch Wolberg
![]() Delphi Developer |
Mon, 05 Nov 2001 03:00:00 GMT
ClipBoard + TMemoryStream?
I came up with what I thought was a clever scheme for my program. I
created a custom component that has Read and Write methods to a stream. This way I can read and write my components to a TFileStream for my file I/O. This part works fine but I also had in mind that I could Read and Write these items to a TMemoryStream and then copy the MemoryStream to the clipboard for a neat and easy multiple item Cut, Copy and Paste routine. The catch is that writing custom data to the clipboard requires a memory handle and TMemoryStream only provides a pointer. Is there any way to get a handle from this pointer? Does a TMemoryStream not use gloabl memory? I know I could allocate some global memory and then copy the stream Mitch Wolberg, |