tags:

views:

134

answers:

1

How to print a RTF document in a MFC application without displaying it?

The user will go through the following step to print the file: 1. Choose the rtf file. 2. A print dialog box will appear after that 3. Press OK to print the file.

+2  A: 

You can load it in an invisible CRichEditCtrl and pass a printer DC when sending WM_PRINT to the window.

Sheng Jiang 蒋晟
Thanks! Can you please provide me with a simple example how to do this?
david.healed
In fact using FormatRange to print. Example at http://www.codersource.net/forums/173/ShowPost.aspx.
david.healed