Jacek Caban : Sync the WebBrowser's window size with document's
window.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 2 09:45:46 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 84f0597d08a83844289ed6e7248eb72a9da828c8
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=84f0597d08a83844289ed6e7248eb72a9da828c8
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Dec 2 14:54:58 2005
Sync the WebBrowser's window size with document's window.
---
dlls/shdocvw/dochost.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
index 257ac78..d5dc95c 100644
--- a/dlls/shdocvw/dochost.c
+++ b/dlls/shdocvw/dochost.c
@@ -88,6 +88,18 @@ static LRESULT navigate2(WebBrowser *Thi
return 0;
}
+static LRESULT resize_document(WebBrowser *This, LONG width, LONG height)
+{
+ RECT rect = {0, 0, width, height};
+
+ TRACE("(%p)->(%ld %ld)\n", This, width, height);
+
+ if(This->view)
+ IOleDocumentView_SetRect(This->view, &rect);
+
+ return 0;
+}
+
static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
WebBrowser *This;
@@ -96,13 +108,14 @@ static LRESULT WINAPI doc_view_proc(HWND
if(msg == WM_CREATE) {
This = *(WebBrowser**)lParam;
- ERR("create %p\n", This);
SetPropW(hwnd, wszTHIS, This);
}else {
This = GetPropW(hwnd, wszTHIS);
}
switch(msg) {
+ case WM_SIZE:
+ return resize_document(This, LOWORD(lParam), HIWORD(lParam));
case WB_WM_NAVIGATE2:
return navigate2(This);
}
More information about the wine-cvs
mailing list