Solved

Printing content of a CRichEditCtrl

Posted on 1998-04-13
5
696 Views
Last Modified: 2013-11-20
I've got a CRichEditCtrl in a CDialog, and I want to print its content.  I don't have a CDocument class, or a CRichEditView class, so I guess I don't have the framework's printing support.  Any ideas on what to do?  Thanks!
0
Comment
Question by:nbushman
5 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1317656
To print context of the control use WM_PRINT message passing printer HDC as WPARAM
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 1317657
WM_PRINT will only print what's visible in the control at that moment.  (If it even works with RichEdit 1.0; I don't think the control supports it.)

.B ekiM

0
 

Author Comment

by:nbushman
ID: 1317658
Would it be possible for me to stream the data from my CRichEditCtrl into a CRichEditView, and to have the CRichEditView handle the printing?  If this can be done, is there a way that I can do it without actually drawing the CRichEditView window?  Can I just instanciate (but not display) a CRichEditView, stream my RTF data into it, and have it print?  If any of this is possible, what is the technique, and do you know of any examples?  THANKS!!!!
0
 

Accepted Solution

by:
yangjun earned 100 total points
ID: 1317659
Call CEditViewCtrl::FormPage. It works!

0
 

Author Comment

by:nbushman
ID: 1317660
Umm... I don't know why I accepted yangjun's answer.  

His solution, to use CEditViewCtrl::FormPage() is puzzling because as far as I can tell, there ISN'T such a class.  In addition to that, no classes have a FormPage() member function.  What am I missing here?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Looking for a specific application/software 2 119
unable to delete all specified values regedit 38 705
List out all word 7 332
I could not set window to top 4 40
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question