OLE Container and HTML

General TRichView support forum. Please post your questions here
Post Reply
Hanno
Posts: 22
Joined: Sun Mar 05, 2006 12:28 pm

OLE Container and HTML

Post by Hanno »

Hi,

I saw some posts on showing OLE in RTF, but is there a way to convert the OleContainer into an image, when saving to html?
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I am not sure about the best solution, but it seems that OleContainer.PaintTo works.
You can use
function DrawControl(ctrl: TControl): TBitmap;
from CtrlImg unit to create a bitmap from OleContainer (this function uses PaintTo inside).
Do not forget to free this bitmap after saving.

For saving in HTML, use OnSaveComponentToFile event.
Hanno
Posts: 22
Joined: Sun Mar 05, 2006 12:28 pm

Post by Hanno »

Lovely, thanks, that works well :-)
Post Reply