Hi everyone,

I'm busy working on a word processor in Visual C++ 2008 and I need some help with a Print option, and a Page Setup option. What I'm trying to do is print the contents of a RichTextBox control (txtdisplay), and can't find any way to get it to work. Google hasn't helped at all, and I'm a true noob...

Here are the controls I currently have:

txtdisplay (the RichTextBox)
printDocument1 (Printdocument control)
pageSetup1 (Page Setup Dialog)
PrintDialog1 (Print Dialog Box)

So if anyone experienced with Visual C++ 2008 could lend a hand in terms of printing, it would be greatly appreciated.

Thanks in advance.

Thanks for the links, but I don't think you quite understand what I need.

You see, I'm trying to print the content of the richtextbox control, like in Windows Notepad. Click the Print button, it opens the dialog, and prints the content of the text area.

I've tried searching google, it gives a million ways to do it, but only in Visual Basic :(

Don't forget that I'm a total noob, sorry.

This article has been dead for over six months. Start a new discussion instead.