wine/dlls/shdocvw oleobject.c
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 2 04:29:57 CST 2005
ChangeSet ID: 21615
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/12/02 04:29:57
Modified files:
dlls/shdocvw : oleobject.c
Log message:
Jacek Caban <jacek at codeweavers.com>
Sync window sizes.
Patch: http://cvs.winehq.org/patch.py?id=21615
Old revision New revision Changes Path
1.23 1.24 +26 -1 wine/dlls/shdocvw/oleobject.c
Index: wine/dlls/shdocvw/oleobject.c
diff -u -p wine/dlls/shdocvw/oleobject.c:1.23 wine/dlls/shdocvw/oleobject.c:1.24
--- wine/dlls/shdocvw/oleobject.c:1.23 2 Dec 2005 10:29:57 -0000
+++ wine/dlls/shdocvw/oleobject.c 2 Dec 2005 10:29:57 -0000
@@ -31,8 +31,33 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
static ATOM shell_embedding_atom = 0;
+static LRESULT resize_window(WebBrowser *This, LONG width, LONG height)
+{
+ if(This->doc_view_hwnd)
+ SetWindowPos(This->doc_view_hwnd, NULL, 0, 0, width, height,
+ SWP_NOZORDER | SWP_NOACTIVATE);
+
+ return 0;
+}
+
static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ WebBrowser *This;
+
+ static const WCHAR wszTHIS[] = {'T','H','I','S',0};
+
+ if(msg == WM_CREATE) {
+ This = *(WebBrowser**)lParam;
+ SetPropW(hwnd, wszTHIS, This);
+ }else {
+ This = GetPropW(hwnd, wszTHIS);
+ }
+
+ switch(msg) {
+ case WM_SIZE:
+ return resize_window(This, LOWORD(lParam), HIWORD(lParam));
+ }
+
return DefWindowProcA(hwnd, msg, wParam, lParam);
}
@@ -477,8 +502,8 @@ static HRESULT WINAPI OleInPlaceObject_S
if(This->shell_embedding_hwnd) {
SetWindowPos(This->shell_embedding_hwnd, NULL,
lprcPosRect->left, lprcPosRect->top,
- lprcPosRect->bottom-lprcPosRect->top,
lprcPosRect->right-lprcPosRect->left,
+ lprcPosRect->bottom-lprcPosRect->top,
SWP_NOZORDER | SWP_NOACTIVATE);
}
More information about the wine-cvs
mailing list