quick report : writing in canvas causes problem

2004-09-01 05:18:43 AM
I'm trying to put a background in a QR by loading a metafile and
writing directly on the canvas like that :
std::auto_ptr<TMetafile>tmp(new TMetafile());
TRect rect = QuickRep1->ClientRect;
QuickRep1->QRPrinter->Canvas->StretchDraw(rect, tmp.get());
BUT once I close the preview window I get an error
EOSError with message 'System Error. Code: 1400.Invalid window handle'
Does anybody has an idea/other way to do that?