MSHTML: Call ShowUI and HideUI in UIActivate

Jacek Caban jack at itma.pwr.wroc.pl
Wed Jul 13 03:08:58 CDT 2005


Changelog:
    Call ShowUI and HideUI in UIActivate
-------------- next part --------------
Index: dlls/mshtml/view.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/view.c,v
retrieving revision 1.7
diff -u -p -r1.7 view.c
--- dlls/mshtml/view.c	12 Jul 2005 17:00:58 -0000	1.7
+++ dlls/mshtml/view.c	13 Jul 2005 08:03:37 -0000
@@ -264,6 +264,8 @@ static HRESULT WINAPI OleDocumentView_UI
             return hres;
         }
 
+        TRACE("got parent window %p\n", parent_hwnd);
+
         hwnd = CreateWindowExW(0, wszInternetExplorer_Server, NULL,
                 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
                 posrect.left, posrect.top, posrect.right-posrect.left, posrect.bottom-posrect.top,
@@ -298,11 +300,16 @@ static HRESULT WINAPI OleDocumentView_UI
             IOleInPlaceFrame_Release(This->frame);
         This->frame = pIPFrame;
         This->hwnd = hwnd;
+
+        hres = IDocHostUIHandler_ShowUI(This->hostui, 0, ACTOBJ(This), CMDTARGET(This),
+                pIPFrame, NULL);
+        if(FAILED(hres))
+            IDocHostUIHandler_HideUI(This->hostui);
     }else {
-        static const WCHAR wszEmpty[] = {0};
-    
         if(This->frame)
-            IOleInPlaceFrame_SetActiveObject(This->frame, NULL, wszEmpty);
+            IOleInPlaceFrame_SetActiveObject(This->frame, NULL, NULL);
+        if(This->hostui)
+            IDocHostUIHandler_HideUI(This->hostui);
         if(This->ipsite)
             IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE);
     }


More information about the wine-patches mailing list