Jacek Caban : shdocvw: Set parent window in activate_inplace.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 6 05:48:35 CST 2006


Module: wine
Branch: master
Commit: 30b24fbf7f55e66c7481ea3c9a9197dc35aba5f8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=30b24fbf7f55e66c7481ea3c9a9197dc35aba5f8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Nov  5 17:38:16 2006 +0100

shdocvw: Set parent window in activate_inplace.

---

 dlls/shdocvw/oleobject.c |   10 ++++++----
 dlls/shdocvw/shdocvw.h   |    1 -
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index aef1dd1..a3e1ed6 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -30,6 +30,9 @@ #include "htiframe.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
 
+/* shlwapi.dll */
+HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent);
+
 static ATOM shell_embedding_atom = 0;
 
 static LRESULT resize_window(WebBrowser *This, LONG width, LONG height)
@@ -127,9 +130,9 @@ static HRESULT activate_inplace(WebBrows
         return E_FAIL;
     }
 
-    hres = IOleInPlaceSite_GetWindow(This->inplace, &This->iphwnd);
-    if(FAILED(hres))
-        This->iphwnd = parent_hwnd;
+    hres = IOleInPlaceSite_GetWindow(This->inplace, &parent_hwnd);
+    if(SUCCEEDED(hres))
+        SHSetParentHwnd(This->shell_embedding_hwnd, parent_hwnd);
 
     IOleInPlaceSite_OnInPlaceActivate(This->inplace);
 
@@ -810,7 +813,6 @@ void WebBrowser_OleObject_Init(WebBrowse
     This->client = NULL;
     This->inplace = NULL;
     This->container = NULL;
-    This->iphwnd = NULL;
     This->frame_hwnd = NULL;
     This->frame = NULL;
     This->uiwindow = NULL;
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 61cdd94..8f0d4fd 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -111,7 +111,6 @@ struct WebBrowser {
 
     /* window context */
 
-    HWND iphwnd;
     HWND frame_hwnd;
     IOleInPlaceFrame *frame;
     IOleInPlaceUIWindow *uiwindow;




More information about the wine-cvs mailing list