PRB: Toolbar removed from Active Document in a frame in IE4Last reviewed: November 24, 1997Article ID: Q177239 |
The information in this article applies to:
SYMPTOMSWhen an MFC Active Document is inserted into a frame in Internet Explorer 4.0, the toolbar is removed from the Active Document when focus is set to another frame. Even when focus is set back to the frame that contains the Active Document, the toolbar does not reappear.
CAUSEActive Documents are UI Deactivated when focus is set to another frame, but MFC-based Active Documents are not automatically UI Activated when focus is set back to the frame containing the document.
STATUSThis behavior is by design.
MORE INFORMATIONIn order for the toolbar to reappear when the focus is set to the frame containing the Active Document, you must override CWnd::OnMouseActivate() in your CView-derived class and call COleServerDoc::ActivateInPlace(). Here is the code that is needed to override CWnd::OnMouseActivate(). MyView.h
afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);MyView.cpp
BEGIN_MESSAGE_MAP(CMyView, CView) ... ON_WM_MOUSEACTIVATE() ... END_MESSAGE_MAP() int CMyView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message) { COleServerDoc* pDoc = (COleServerDoc*)GetDocument(); pDoc->ActivateInPlace(); return CView::OnMouseActivate(pDesktopWnd, nHitTest, message); } Keywords : AXSDKControls MfcOLE kbcode Technology : kbInetDev kbole Version : WINDOWS:4.0,97; WINNT: Platform : WINDOWS winnt Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |