问题
How the Print and Print Preview ending notifications are done in the CHtmlView class?
Normal CView related classes have the OnEndPreview() and OnEndPrinting() evnets that were called by the framework itself and we can override them for the appropriate context.
void CMyHtmlView::OnFilePrintPreview()
{
// Before this I will call a Function Generate a HTML File in a Location and Updated in m_sFileName
Navigate2(m_sFileName);
ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_PROMPTUSER, NULL, NULL );
}
void CMyHtmlView::OnFilePrint()
{
// Before this I will call a Function Generate a HTML File in a Location and Updated in m_sFileName
Navigate2(m_sFileName,NULL,NULL);
CHtmlView::OnFilePrint();
}
On adding the OnEndPrintPreview() and OnEndPrinting() to the above code is never getting hit on the End functions :(
Is there any way round?
EDIT 1: I now also trapped into the problem of not getting focus for the Parent Window, from where the Print Preview been generated, after the Print Preview through ExecWB closed.
Please help me.. :(
来源:https://stackoverflow.com/questions/23293786/notification-for-the-end-of-printing-and-print-preview-of-the-chtmlview-and-deri