Alexander Nicolaysen Sørnes : shdocvw: Add support for setting the statusbar text in IE.
Alexandre Julliard
julliard at winehq.org
Fri Jul 30 10:24:17 CDT 2010
Module: wine
Branch: master
Commit: 9a4c3649540e9c62b6e45e7a88556892736f4b6f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a4c3649540e9c62b6e45e7a88556892736f4b6f
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Thu Jul 29 13:45:17 2010 +0200
shdocvw: Add support for setting the statusbar text in IE.
---
dlls/shdocvw/ie.c | 6 ++++--
dlls/shdocvw/iexplore.c | 15 ++++++++++++---
dlls/shdocvw/shdocvw.h | 4 +++-
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/shdocvw/ie.c b/dlls/shdocvw/ie.c
index a484de5..43afd31 100644
--- a/dlls/shdocvw/ie.c
+++ b/dlls/shdocvw/ie.c
@@ -396,8 +396,10 @@ static HRESULT WINAPI InternetExplorer_get_StatusText(IWebBrowser2 *iface, BSTR
static HRESULT WINAPI InternetExplorer_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
{
InternetExplorer *This = WEBBROWSER_THIS(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(StatusText));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(StatusText));
+
+ return update_ie_statustext(This, StatusText);
}
static HRESULT WINAPI InternetExplorer_get_ToolBar(IWebBrowser2 *iface, int *Value)
diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c
index 52cde1b..2f15987 100644
--- a/dlls/shdocvw/iexplore.c
+++ b/dlls/shdocvw/iexplore.c
@@ -41,12 +41,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
#define IDI_APPICON 1
+#define DOCHOST_THIS(iface) DEFINE_THIS2(InternetExplorer,doc_host,iface)
+
static const WCHAR szIEWinFrame[] = { 'I','E','F','r','a','m','e',0 };
/* Windows uses "Microsoft Internet Explorer" */
static const WCHAR wszWineInternetExplorer[] =
{'W','i','n','e',' ','I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r',0};
+HRESULT update_ie_statustext(InternetExplorer* This, LPCWSTR text)
+{
+ if(!SendMessageW(This->status_hwnd, SB_SETTEXTW, MAKEWORD(SB_SIMPLEID, 0), (LPARAM)text))
+ return E_FAIL;
+
+ return S_OK;
+}
+
void adjust_ie_docobj_rect(HWND frame, RECT* rc)
{
HWND hwndRebar = GetDlgItem(frame, IDC_BROWSE_REBAR);
@@ -378,9 +388,8 @@ static void WINAPI DocHostContainer_GetDocObjRect(DocHost* This, RECT* rc)
static HRESULT WINAPI DocHostContainer_SetStatusText(DocHost* This, LPCWSTR text)
{
- FIXME("(%p)->(%s)\n", This, debugstr_w(text));
-
- return E_NOTIMPL;
+ InternetExplorer* ie = DOCHOST_THIS(This);
+ return update_ie_statustext(ie, text);
}
static void WINAPI DocHostContainer_SetURL(DocHost* This, LPCWSTR url)
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 151b48b..d20e834 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -270,7 +270,8 @@ HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**);
HRESULT TaskbarList_Create(IUnknown*,REFIID,void**);
-#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
+#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
+#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
/**********************************************************************
* Dll lifetime tracking declaration for shdocvw.dll
@@ -283,6 +284,7 @@ extern HINSTANCE shdocvw_hinstance;
extern void register_iewindow_class(void);
extern void unregister_iewindow_class(void);
extern void adjust_ie_docobj_rect(HWND, RECT*);
+extern HRESULT update_ie_statustext(InternetExplorer*, LPCWSTR);
HRESULT register_class_object(BOOL);
HRESULT get_typeinfo(ITypeInfo**);
More information about the wine-cvs
mailing list