trichview.com

trichview.support




Re: Question on TRvHelper example and preview


Return to index


Author

Message

zet

Posted: 04/01/2003 16:51:35


Sergey Tkachenko wrote:

> Well, probably.

> TRVPrintPreview was seriously changed since 1.7

Actually there was a bug in your code.


It looked like this:

     SetWindowOrgEx(Canvas.Handle, -DocLeft, -HeaderTop, @pt);

     rvh2.DrawPage(1, Canvas, True, rvh2.EndAt);

     SetWindowOrgEx(Canvas.Handle, -DocLeft, -DocTop, @pt); // @pt

replaced by new value

     rvh.DrawPage(PageNo, Canvas, True, DocHeight);

     SetWindowOrgEx(Canvas.Handle, pt.x, pt.y, nil);


And that's how it should look:

     SetWindowOrgEx(Canvas.Handle, -DocLeft, -HeaderTop, @pt);

     rvh2.DrawPage(1, Canvas, True, rvh2.EndAt);

     SetWindowOrgEx(Canvas.Handle, -DocLeft, -DocTop, nil); // @pt is safe

     rvh.DrawPage(PageNo, Canvas, True, DocHeight);

     SetWindowOrgEx(Canvas.Handle, pt.x, pt.y, nil);


Now it works excellent. Thanks again for idea ;)





Powered by ABC Amber Outlook Express Converter