Sync window sizes.

This commit is contained in:
Jacek Caban 2005-12-02 11:25:30 +01:00 committed by Alexandre Julliard
parent 4db7733369
commit 9f59c164b8
1 changed files with 26 additions and 1 deletions

View File

@ -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_SetObjectRects(IOleInPlaceObject *iface,
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);
}