Hi There,
Why the following code generated SIGFPE on BitBlt?
=======================================
procedure TForm1.Button1Click(Sender: TObject);
var
? png: TPortableNetworkGraphic;
? ScreenDC, ClipDC: HDC;
? r: TRect;
begin
? r := Rect(0, 0, 300, 200);
? png := TPortableNetworkGraphic.Create;
? ScreenDC := GetDC(0);
? ClipDC := CreateCompatibleDC(ScreenDC);
? BitBlt(ClipDC, 0, 0, r.Right - r.Left, r.Bottom - r.Top, ScreenDC, r.Left, r.Top, SRCCOPY);
? png.LoadFromDevice(ClipDC);
? DeleteDC(ClipDC);
? ReleaseDC(0, ScreenDC);
? png.SaveToFile('test.png');
end;
=======================================I am on Ubuntu GTK2 and hope this code to run cross platform.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130301/e7b8c51f/attachment.html>
