- launch task manager
authorMartin Fuchs <fuchs.martin@gmail.com>
Tue, 24 Feb 2004 20:00:03 +0000 (20:00 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Tue, 24 Feb 2004 20:00:03 +0000 (20:00 +0000)
- set foregroundwindow when opening start menu (CTRL-ESC shortcut)

svn path=/branches/lean-explorer/; revision=8353

reactos/subsys/system/explorer/explorer_intres.h
reactos/subsys/system/explorer/explorer_intres.rc
reactos/subsys/system/explorer/taskbar/desktopbar.cpp
reactos/subsys/system/explorer/taskbar/startmenu.cpp

index 80433d3..b4d991a 100644 (file)
 #define ID_STOP                         40009
 #define ID_MINIMIZE_ALL                 40010
 #define ID_EXPLORE                      40011
-#define ID_SWITCH_DESKTOP_1             40012
+#define ID_SWITCH_DESKTOP_1             50000
+#define ID_TASKMGR                      40012
 #define ID_WINDOW_NEW                   0xE130
 #define ID_EDIT_PROPERTIES              57656
 #define ID_FILE_EXIT                    0xE141
index c41b543..8611fd3 100644 (file)
@@ -409,6 +409,7 @@ BEGIN
     BEGIN
         MENUITEM "&About Explorer...",          ID_ABOUT_EXPLORER
         MENUITEM "&Settings...",                ID_DESKTOPBAR_SETTINGS
+        MENUITEM "&Task Manager...",            ID_TASKMGR
     END
 END
 
index 9fb0121..759d7d2 100644 (file)
@@ -245,6 +245,10 @@ int DesktopBar::Command(int id, int code)
                explorer_show_frame(SW_SHOWNORMAL);
                break;
 
+         case ID_TASKMGR:
+               launch_file(_hwnd, TEXT("taskmgr.exe"), SW_SHOWNORMAL);
+               break;
+
          case ID_SWITCH_DESKTOP_1:
          case ID_SWITCH_DESKTOP_1+1:
          case ID_SWITCH_DESKTOP_1+2:
index dc7d96b..e9be4de 100644 (file)
@@ -1359,6 +1359,7 @@ void StartMenuRoot::TrackStartmenu()
 
         // show previously hidden start menu
        ShowWindow(hwnd, SW_SHOW);
+       SetForegroundWindow(hwnd);
 
        while(IsWindow(hwnd)) {
                if (!GetMessage(&msg, 0, 0, 0)) {