Board index » delphi » Needed: Delphi component or code to print RichEdit contents to a Canvas

Needed: Delphi component or code to print RichEdit contents to a Canvas

I need to print the contents of a RichEdit or possibly a derived control to
both an Image Canvas and a Printer Canvas. I would like to be able to control
the output rectangle. Does anybody know of a component or code which will do
this?

        Thanks

                Dave

-----------------------------------------------------------------------------
  David J. Grossman - nob...@unpronounceable.com
  (unpronounceable) Productions - http://www.unpronounceable.com
  Dave's Home Page - http://www.unpronounceable.com/daves
-----------------------------------------------------------------------------

 

Re:Needed: Delphi component or code to print RichEdit contents to a Canvas


Quote
Dave J.G. <nob...@unpronounceable.com> wrote:
>I need to print the contents of a RichEdit or possibly a derived control to
>both an Image Canvas and a Printer Canvas. I would like to be able to control
>the output rectangle. Does anybody know of a component or code which will do
>this?

You should be able to do it just by sending it a EM_FORMATRANGE message,
passing it the handle of your canvasses. Read the WinAPI documentation of
this message for more details.

(PS. All guesswork on my part; I've never done it myself).

--
Lucian Wischik, Queens' College, Cambridge CB3 9ET. ljw1...@cam.ac.uk

Re:Needed: Delphi component or code to print RichEdit contents to a Canvas


On 8 Apr 1997 03:44:42 GMT, "Dave J.G." <nob...@unpronounceable.com>
wrote:

Quote
>I need to print the contents of a RichEdit or possibly a derived control to
>both an Image Canvas and a Printer Canvas. I would like to be able to control
>the output rectangle. Does anybody know of a component or code which will do
>this?

>    Thanks

>            Dave

>-----------------------------------------------------------------------------
>  David J. Grossman - nob...@unpronounceable.com
>  (unpronounceable) Productions - http://www.unpronounceable.com
>  Dave's Home Page - http://www.unpronounceable.com/daves
>-----------------------------------------------------------------------------

Check out the Borland Technical Information Document TI3204, it fixes
a problem with NT4 but should also show you how a RichEdit control
prints.

Other Threads