shdocvw: Set parent window in activate_inplace.

This commit is contained in:
Jacek Caban 2006-11-05 17:38:16 +01:00 committed by Alexandre Julliard
parent 53fe2d1531
commit 30b24fbf7f
2 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
/* shlwapi.dll */
HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent);
static ATOM shell_embedding_atom = 0; static ATOM shell_embedding_atom = 0;
static LRESULT resize_window(WebBrowser *This, LONG width, LONG height) static LRESULT resize_window(WebBrowser *This, LONG width, LONG height)
@ -127,9 +130,9 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site, H
return E_FAIL; return E_FAIL;
} }
hres = IOleInPlaceSite_GetWindow(This->inplace, &This->iphwnd); hres = IOleInPlaceSite_GetWindow(This->inplace, &parent_hwnd);
if(FAILED(hres)) if(SUCCEEDED(hres))
This->iphwnd = parent_hwnd; SHSetParentHwnd(This->shell_embedding_hwnd, parent_hwnd);
IOleInPlaceSite_OnInPlaceActivate(This->inplace); IOleInPlaceSite_OnInPlaceActivate(This->inplace);
@ -810,7 +813,6 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
This->client = NULL; This->client = NULL;
This->inplace = NULL; This->inplace = NULL;
This->container = NULL; This->container = NULL;
This->iphwnd = NULL;
This->frame_hwnd = NULL; This->frame_hwnd = NULL;
This->frame = NULL; This->frame = NULL;
This->uiwindow = NULL; This->uiwindow = NULL;

View File

@ -111,7 +111,6 @@ struct WebBrowser {
/* window context */ /* window context */
HWND iphwnd;
HWND frame_hwnd; HWND frame_hwnd;
IOleInPlaceFrame *frame; IOleInPlaceFrame *frame;
IOleInPlaceUIWindow *uiwindow; IOleInPlaceUIWindow *uiwindow;