Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2007 May : QClipbrd unit
| Subject: | QClipbrd unit |
| Posted by: | "Enquiring Mind" (enquiring.mind@nospam.btopenworld.com) |
| Date: | Wed, 9 May 2007 17:22:22 |
Hi,
I have noticed that the much higher level TClipboard definition that is
given in the QClipbrd unit can be used in Win32 applications instead of the
'dark ages' version given in the Clipbrd unit. Why dark ages? Because the
Clipbrd unit forces one to use unsafe low level methods for getting binary
data into and out of the clipboard. The Stream abstraction in the QClipbrd
unit is much safer and more elegant.
However I have a couple of questions. In the Clipbrd unit, when copying data
in multiple data formats to the clipboard, one may wrap multiple clipboard
write operations in a Clipboard.Open and Clipboard.Close construct. I
presume that Clipboard.Open locks the clipboard from concurrent read/write
access, while Clipboard.Close unlocks it. Is that the case?
In the Clipbrd unit, on the other hand, one uses repeated calls the
AddFormat method to copy data in multiple data formats to the clipboard. The
methods Open and Close are not available. So how does one prevent concurrent
access to the clipboard during a multiple AddFormat operation?
Another question is: A pre-defined MIME type is 'image/delphi.drawing'
corresponding to a TDrawing object. This seems to be a Linux file containing
a stream of drawing commands. Is this compatible with CF_METAFILEPICT under
Windows?
Thanks in advance.
Enquiring Mind