Solved

Printing content of a CRichEditCtrl

Posted on 1998-04-13
5
682 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
Comment Utility
To print context of the control use WM_PRINT message passing printer HDC as WPARAM
0
 
LVL 11

Expert Comment

by:mikeblas
Comment Utility
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
Comment Utility
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
Comment Utility
Call CEditViewCtrl::FormPage. It works!

0
 

Author Comment

by:nbushman
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now