Solved

Printing content of a CRichEditCtrl

Posted on 1998-04-13
5
690 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 429
sumNumber challenge 16 122
maven archtype selection in eclipse 1 57
Not needed 13 110
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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