Alexander Nicolaysen Sørnes : shdocvw: Add a statusbar to IE.
Alexandre Julliard
julliard at winehq.org
Fri Jul 30 10:24:17 CDT 2010
Module: wine
Branch: master
Commit: e532b1c3bd7e8da23b0fc75955670888a4bcd5bd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e532b1c3bd7e8da23b0fc75955670888a4bcd5bd
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Thu Jul 29 11:35:42 2010 +0200
shdocvw: Add a statusbar to IE.
---
dlls/shdocvw/Makefile.in | 2 +-
dlls/shdocvw/iexplore.c | 16 ++++++++++++++++
dlls/shdocvw/resource.h | 1 +
dlls/shdocvw/shdocvw.h | 1 +
4 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in
index fa2b3ac..9e2d8e1 100644
--- a/dlls/shdocvw/Makefile.in
+++ b/dlls/shdocvw/Makefile.in
@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shdocvw.dll
IMPORTLIB = shdocvw
-IMPORTS = uuid shell32 shlwapi user32 gdi32 advapi32
+IMPORTS = uuid shell32 comctl32 shlwapi user32 gdi32 advapi32
DELAYIMPORTS = version urlmon ole32 oleaut32
C_SRCS = \
diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c
index b2359ca..52cde1b 100644
--- a/dlls/shdocvw/iexplore.c
+++ b/dlls/shdocvw/iexplore.c
@@ -50,10 +50,19 @@ static const WCHAR wszWineInternetExplorer[] =
void adjust_ie_docobj_rect(HWND frame, RECT* rc)
{
HWND hwndRebar = GetDlgItem(frame, IDC_BROWSE_REBAR);
+ HWND hwndStatus = GetDlgItem(frame, IDC_BROWSE_STATUSBAR);
INT barHeight = SendMessageW(hwndRebar, RB_GETBARHEIGHT, 0, 0);
rc->top += barHeight;
rc->bottom -= barHeight;
+
+ if(IsWindowVisible(hwndStatus))
+ {
+ RECT statusrc;
+
+ GetClientRect(hwndStatus, &statusrc);
+ rc->bottom -= statusrc.bottom - statusrc.top;
+ }
}
static INT_PTR CALLBACK ie_dialog_open_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
@@ -145,7 +154,12 @@ static void create_rebar(HWND hwnd)
static LRESULT iewnd_OnCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
{
+ InternetExplorer* This = (InternetExplorer*)lpcs->lpCreateParams;
SetWindowLongPtrW(hwnd, 0, (LONG_PTR) lpcs->lpCreateParams);
+
+ This->status_hwnd = CreateStatusWindowW(CCS_NODIVIDER|WS_CHILD|WS_VISIBLE, NULL, hwnd, IDC_BROWSE_STATUSBAR);
+ SendMessageW(This->status_hwnd, SB_SIMPLE, TRUE, 0);
+
create_rebar(hwnd);
return 0;
@@ -157,6 +171,8 @@ static LRESULT iewnd_OnSize(InternetExplorer *This, INT width, INT height)
INT barHeight = SendMessageW(hwndRebar, RB_GETBARHEIGHT, 0, 0);
RECT docarea = {0, 0, width, height};
+ SendMessageW(This->status_hwnd, WM_SIZE, 0, 0);
+
adjust_ie_docobj_rect(This->frame_hwnd, &docarea);
if(This->doc_host.hwnd)
diff --git a/dlls/shdocvw/resource.h b/dlls/shdocvw/resource.h
index 7283b71..91e9a11 100644
--- a/dlls/shdocvw/resource.h
+++ b/dlls/shdocvw/resource.h
@@ -26,6 +26,7 @@
#define IDC_BROWSE_OPEN_URL 1002
#define IDC_BROWSE_REBAR 1003
#define IDC_BROWSE_ADDRESSBAR 1004
+#define IDC_BROWSE_STATUSBAR 1005
#define ID_BROWSE_NEW_WINDOW 275
#define ID_BROWSE_OPEN 256
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 2bdf436..151b48b 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -189,6 +189,7 @@ struct InternetExplorer {
LONG ref;
HWND frame_hwnd;
+ HWND status_hwnd;
DocHost doc_host;
};
More information about the wine-cvs
mailing list