
Adding Print and Print Preview to Richedit Control
I've got a Rich Edit control on my main window(not in a dialog box) which I
created using code added to my View as follows:
void CSs1wppView::OnInitialUpdate()
{
// // Create the rich edit control
if (!m_ctlRichEdit.Create(
WS_CHILD | WS_VISIBLE |WS_HSCROLL|WS_VSCROLL| WS_BORDER
|WS_THICKFRAME| ES_MULTILINE|ES_SUNKEN,
CRect(8, 26, 610, 360), this, 20003))
{
TRACE0(_T("Problem creating rich edit control!"));
// return FALSE;
}
// Set options for this rich edit control
m_ctlRichEdit.SetOptions(ECOOP_SET, ECO_AUTOWORDSELECTION |
ECO_AUTOVSCROLL | ECO_WANTRETURN | ECO_SAVESEL);
m_ctlRichEdit.DragAcceptFiles(TRUE);
GenerateRichText();
m_ctlRichEdit.ShowWindow(SW_SHOW);
... etc.
Is there a way to use wizard to add Print and Print Preview capability to
print the contents of the RichEdit control?
If not, is there an example somewhere that shows how to add Print and Print
Preview Capability to the RichEdit?
Thanks
Jim