From 966cf7c86e72c456bd7f149bc37265389055e819 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 25 Jun 2008 14:49:33 +0200 Subject: [PATCH] explorer.exe: Create the top-level message window along with the desktop window. --- programs/explorer/desktop.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 246e14b7b92..552d11bab6c 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -230,8 +230,9 @@ static void set_desktop_window_title( HWND hwnd, const WCHAR *name ) void manage_desktop( WCHAR *arg ) { static const WCHAR defaultW[] = {'D','e','f','a','u','l','t',0}; + static const WCHAR messageW[] = {'M','e','s','s','a','g','e',0}; MSG msg; - HWND hwnd; + HWND hwnd, msg_hwnd; unsigned long xwin = 0; unsigned int width, height; WCHAR *cmdline = NULL; @@ -293,6 +294,11 @@ void manage_desktop( WCHAR *arg ) GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN), GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN), 0, 0, 0, NULL ); + + /* create the HWND_MESSAGE parent */ + msg_hwnd = CreateWindowExW( 0, messageW, NULL, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + 0, 0, 100, 100, 0, 0, 0, NULL ); + if (hwnd == GetDesktopWindow()) { SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)desktop_wnd_proc ); @@ -309,6 +315,8 @@ void manage_desktop( WCHAR *arg ) hwnd = 0; } + if (GetAncestor( msg_hwnd, GA_PARENT )) DestroyWindow( msg_hwnd ); /* someone beat us to it */ + /* if we have a command line, execute it */ if (cmdline) {