Alexandre Julliard : explorer.exe: Create the top-level message window along with the desktop window.

Alexandre Julliard julliard at winehq.org
Wed Jun 25 16:43:46 CDT 2008


Module: wine
Branch: master
Commit: 966cf7c86e72c456bd7f149bc37265389055e819
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=966cf7c86e72c456bd7f149bc37265389055e819

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun 25 14:49:33 2008 +0200

explorer.exe: Create the top-level message window along with the desktop window.

---

 programs/explorer/desktop.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 246e14b..552d11b 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)
     {




More information about the wine-cvs mailing list