PRB: MFC Active Document Appears to Hang When Printed from IELast reviewed: December 15, 1997Article ID: Q178060 |
The information in this article applies to:
SYMPTOMSWhen an Active Document is viewed in Internet Explorer and the document is printed using the IOLECommandTarget command mechanism, the Active Document server appears to hang.
CAUSEThe Active Document View window is disabled during the print operation and not enabled on completion.
RESOLUTIONOverride CView::OnFilePrint(), the default handler for ID_FILE_PRINT, in the Active Document server CView-derived class and insert a call to EnableWindow() as follows:
void CMyView::OnFilePrint() { CView::OnFilePrint(); AfxGetMainWnd()->EnableWindow(); // TRUE by default }NOTE: Make sure you call the base-class OnFilePrint() before the call to EnableWindow(). ClassWizard does not insert this call for you.
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONInternet Explorer issues the Print command to the Active Document server through a call to IOleCommandTarget::Exec using the OLECMDID_PRINT identifier. The BINDSCRB sample code demonstrates mapping this command to ID_FILE_PRINT by adding the ON_OLECMD_PRINT macro to the document's OLECMD map. However, after printing, the Active Document server no longer accepts input.
Steps to Reproduce Behavior
REFERENCES
|
Additional query words: DocObject server DocObj Active Document
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |