LCL file clipbrd.inc contains the following method which is unable to get picture from clipboard (Lazarus 0.9.22, Win32 platfotm):

function TClipboard.AssignToGraphic(Dest: TGraphic; FormatID: TClipboardFormat
 ): boolean;
var
 MemStream: TMemoryStream;
begin
 Result:=false;
 if FormatID=0 then exit;
 MemStream:=TMemoryStream.Create;
 try
   // if not GetFormat(FormatID,MemStream) then exit;
   MemStream.Position:=0;
   Dest.LoadFromMimeStream(MemStream,ClipboardFormatToMimeType(FormatID));
 finally
   MemStream.Free;
 end;
 Result:=true;
end;

I think MemStream object should be filled by some data, isn't it? But i don't know how to.

And also TClipboard.HasFormat( CF_Bitmap) returns false. But at the same time i sure the clipboard contains bitmap, and it is possible to paste this bitmap into MS Paint or extract in Delphi with "Destination.LoadFromClipboardFormat(CF_Bitmap, ClipBoard.GetAsHandle(CF_Bitmap), 0)" method.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to