I am creating a hidden CHtmlView, just so I can print it's content. It
works perfectly, but I am bit uncomfortable with it. I have a feeling that
it's going to bite me later.
//LSActivityPrintView inherits from CHtmlView
CRuntimeClass *pViewClass = RUNTIME_CLASS(LSActivityPrintView);
LSActivityPrintView * pView = (LSActivityPrintView
if (!pView->Create(NULL, NULL, WS_CHILD | WS_BORDER,
rect, ::AfxGetMainWnd(), (AFX_IDW_PANE_FIRST), NULL))
TRACE0( "Unable to create printing view\n" );
//Yeild is simply a message pump.
//this is what I am uncomfortable about.
Since OnFilePrint returns immidately (brings up CPrintDialog, and then
prints) I am not sure if it is safe to call DestroyWindow as I am doing.