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