trichview.support
Simple App with TRichView crashes Delphi with memory error |
Author |
Message |
JohnS |
Posted: 04/05/2004 22:05:35 I am evaluating TRichView for general use in my applications (using Delphi 7). I am using default properties. When I use only text, everything works fine (printing, copying to file and clipboard, etc.). However, I have tried inserting a graphic with AddPictureEX as per the code snippet below. The graphic is being copied as a bitmap from a portion of one of my open forms. miniBitmap:=TBitmap.Create; miniBitmap.Width:=sourceWidth; miniBitmap.Height:=sourceHeight; ImageForm.ClipImage2.Picture.Graphic:=miniBitmap; ImageForm.ClipImage2.Canvas.CopyRect(Rect(0,0,sourceWidth,sourceHeight),Canv as, Rect(sourceLeft,sourceTop,sourceLeft+sourceWidth,sourceTop+sourceHeight)); miniBitmap.Free; AddPictureEx('',ImageForm.ClipImage2.picture.graphic,0,rvvaBaseline); At first, everything seems to work fine. The graphic appears, can be printed, etc., but when I close the application, I get a Delphi memory error crash. The error does not occur when I close the form(s), but just when I close the application. This same procedure is succesful if I do not use TRichView but instead just copy the graphic directly to printer, file or clipboard. What am I doing wrong? |
Powered by ABC Amber Outlook Express Converter