FIX: Framer Sample Does Not Handle Activation Correctly

Last reviewed: January 19, 1998
Article ID: Q160920
The information in this article applies to:
  • Microsoft ActiveX SDK, version 1.0
  • Internet Client SDK, version 4.0, 4.01

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.

MORE INFORMATION

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          : AXSDKDocObjects
Technology        : kbInetDev
Version           : Win:1.0
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.