[PATCH 5/6] riched20: Retrieve the window from the host.

Huw Davies huw at codeweavers.com
Fri Mar 26 04:08:04 CDT 2021


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/riched20/richole.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index b8b081fc916..b652d5a753a 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1195,20 +1195,19 @@ static ULONG STDMETHODCALLTYPE IOleInPlaceSite_fnRelease(IOleInPlaceSite *iface)
     return IOleClientSite_Release(&This->IOleClientSite_iface);
 }
 
-static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow(IOleInPlaceSite *iface, HWND *phwnd)
+static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnGetWindow( IOleInPlaceSite *iface, HWND *window )
 {
     IOleClientSiteImpl *This = impl_from_IOleInPlaceSite(iface);
 
-    TRACE("(%p)->(%p)\n", This, phwnd);
+    TRACE( "(%p)->(%p)\n", This, window );
 
     if (!This->child.reole)
         return CO_E_RELEASED;
 
-    if (!phwnd)
-        return E_INVALIDARG;
+    if (!window) return E_INVALIDARG;
 
-    *phwnd = This->child.reole->editor->hWnd;
-    return S_OK;
+    if (!This->child.reole->editor->have_texthost2) return E_NOTIMPL;
+    return ITextHost2_TxGetWindow( This->child.reole->editor->texthost, window );
 }
 
 static HRESULT STDMETHODCALLTYPE IOleInPlaceSite_fnContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
-- 
2.23.0




More information about the wine-devel mailing list