Microsoft KB Archive/160920

= FIX: Framer Sample Does Not Handle Activation Correctly =

Article ID: 160920

Article Last Modified on 10/2/2003

-

APPLIES TO


 * Microsoft Internet Explorer 3.0
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2

-



This article was previously published under Q160920



SYMPTOMS
The Framer sample that comes with the ActiveX SDK does not handle Wm_Activateapp. As a result, the contained DocObject is unable to determine if the container is active or not. This becomes a problem when, for example, Word is started within Framer and outside Framer. Actions that you perform in the contained instance of Word, such as bringing up a dialog box, actually occur in the standalone instance instead.



RESOLUTION
The solution to this problem involves notifying the contained DocObject of activation changes by calling IOleInPlaceActiveObject::OnFrameWindowActivate and passing as a parameter True if framer is activating and False if it is deactivating. The following code can be added to Framer.cpp in the FrameWndProc function to handle this: case WM_ACTIVATEAPP: if (NULL != pFR->m_pIOleIPActiveObject) {     HRESULT hr; hr = pFR->m_pIOleIPActiveObject->OnFrameWindowActivate((BOOL)wParam); }     break;



STATUS
Microsoft has confirmed this to be a problem in the Framer sample supplied with the ActiveX SDK. This problem has been fixed in the version of the Framer sample provided with the Internet Client SDK for Internet Explorer 4.0.



Steps to Reproduce Behavior

 * 1) Start Framer (\Inetsdk\Samples\Framer\Debug\Framer).
 * 2) Load a Word document into Framer with File->Open (for example, \Inetsdk\Specs\Asynchronous Storage.doc).
 * 3) Start a standalone copy of Word.
 * 4) Choose View->Toolbars from the contained word instance, and the dialog box comes up in the stand alone instance. If you change the Toolbar settings, notice that the changes are also reflected in the standalone instance of Word.

Keywords: kbbug kbfix KB160920

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.