Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Printing content of a CRichEditCtrl

Posted on 1998-04-13
5
Medium Priority
?
721 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

636 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