From 6ede4e5449880e9d82e3aaf2b24012dfdd26f89a Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sat, 13 Sep 2003 19:01:25 +0000 Subject: [PATCH] work around for Windows NT, Win 98, ... to display desktop window in the correct size svn path=/trunk/; revision=6061 --- reactos/subsys/system/explorer/desktop/desktop.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 5c44dc8b34e..6dba6017354 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -124,14 +124,18 @@ HWND DesktopWindow::Create() int width = GetSystemMetrics(SM_CXSCREEN); int height = GetSystemMetrics(SM_CYSCREEN); - HWND hwndDesktop = Window::Create(WINDOW_CREATOR(DesktopWindow), - WS_EX_TOOLWINDOW, wcDesktop, _T("Program Manager"), WS_POPUP|WS_CLIPCHILDREN|WS_VISIBLE, + HWND hwnd = Window::Create(WINDOW_CREATOR(DesktopWindow), + WS_EX_TOOLWINDOW, wcDesktop, _T("Program Manager"), WS_POPUP|WS_VISIBLE|WS_CLIPCHILDREN, 0, 0, width, height, 0); // work around to display desktop bar in Wine ShowWindow(GET_WINDOW(DesktopWindow, hwndDesktop)->_desktopBar, SW_SHOW); - return hwndDesktop; + // work around for Windows NT, Win 98, ... + // Without this the desktop has mysteriously only a size of 800x600 pixels. + MoveWindow(hwnd, 0, 0, width, height, TRUE); + + return hwnd; } @@ -198,6 +202,10 @@ LRESULT DesktopWindow::Init(LPCREATESTRUCT pcs) HWND hwndFolderView = ::GetNextWindow(hWndView, GW_CHILD); + // work around for Windows NT, Win 98, ... + // Without this the desktop has mysteriously only a size of 800x600 pixels. + MoveWindow(hwndFolderView, 0, 0, rect.right, rect.bottom, TRUE); + new BackgroundWindow(hwndFolderView); } }