I tested...
This work :
[code]
procedure TForm1.Button3Click(Sender: TObject);
begin
with Image1.Picture.Bitmap do begin
Width:=100;
Height:=120;
// fill the entire bitmap with red
Canvas.Pen.Color:=clBlue;
Canvas.Line(0,0,Width,Height);
end;
end;
[/code]
This don't work...
[code]
procedure TForm1.Button4Click(Sender: TObject);
var
LazImage: TLazIntfImage;
ImgHandle,ImgMaskHandle: HBitmap;
begin
LazImage:= TLazIntfImage.create(0,0);
LazImage.DataDescription:=GetDescriptionFromDevice(0, 0, 0); // if comment
this error handle
LazImage.LoadFromFile('d:/lazarus/images/LazarusForm.bmp');
LazImage.CreateBitmaps(ImgHandle, ImgMaskHandle);
Image1.Picture.bitmap.sethandles(ImgHandle, ImgMaskHandle);
LazImage.Free;
with Image1.Picture.Bitmap do begin
Canvas.Pen.Color:=clBlue;
Canvas.Line(0,0,Width,Height);
end;
end;
[/code]
Always white !!
Regards,
--
Laurent.
"If debugging is the art of removing bugs, then programming must be the art
of creating!"
My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus