I inserted two ActiveX control, One is Window Common Dialog Control and I created an instance of this control called "m_ctlCD", and the other control is Rich Text Box Control and I also created an instance of this control called "m_ctlRT".

In the print button, I want to print all the text in the rich text box, but whenever I have 2 or more page of text in the rich text box... The printer only print out one page of text.

My question is how am I able to print all the text in the rich text box using Window Common Dialog Control.

Here is my code in the print button:

void CMyPrint::OnPrint()
{
m_ctlCD.SetFlags (0 + 256);
m_ctlCD.ShowPrinter();
m_ctlRT.SelPrint(m_ctlCD.GetHDC());
}

If anyone could figure it out or struggle with this problem before, please email me for solution.......... I would appreciate for your help.

[email protected]