Click to See Complete Forum and Search --> : Print all pages in Rich Text Box


Kevin101
May 27th, 1999, 04:15 PM
I have a Window Common Dialog Control and a Rich Text Box Control.
I create the first instance of Window Common Dialog Control is m_ctlCD and the second instance of Rich Text Box Control is m_ctlRT.

I create a print button.

Here is the code I have for the print.
void CPrintMyText::OnPrint()
{
m_ctlCD.SetFlags (256 + 0);
m_ctlCD.ShowPrinter();
m_ctlRT.SelPrint(m_ctlCD.GetHDC());
}

Some how this code only print one page, whenever I have 5 page of text in the rich text box control. Then I click on the print button, it just print one page of text from the rich text box.

If anyone struggle with this problem before please email me the solution.
lordz101@hotmail.com
Thank you for your help.