Author: gedmurphy
Date: Thu Jun 18 11:02:52 2015
New Revision: 68184

URL: http://svn.reactos.org/svn/reactos?rev=68184&view=rev
Log:
[DEVMGR]
- Add support for WM_ENTERMENULOOP/WM_EXITMENULOOP and update the status bar 
style to allow hints to be drawn
- Fixup the menu hints

Modified:
    trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp
    trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h
    trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h
    trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc

Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp?rev=68184&r1=68183&r2=68184&view=diff
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp       [iso-8859-1] 
(original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp       [iso-8859-1] 
Thu Jun 18 11:02:52 2015
@@ -29,22 +29,39 @@
     { IDC_EXIT, IDS_HINT_EXIT },
 
     // Action Menu
-    { IDC_UPDATE_DRV, NULL },
-    { IDC_DISABLE_DRV, NULL },
-    { IDC_UNINSTALL_DRV, NULL },
-    { IDC_SCAN_HARDWARE, IDS_HINT_REFRESH },
-    { IDC_ADD_HARDWARE, NULL },
-    { IDC_PROPERTIES, IDS_HINT_PROP},
+    { IDC_PROPERTIES, IDS_HINT_PROPERTIES },
+    { IDC_SCAN_HARDWARE, IDS_HINT_SCAN },
+    { IDC_ENABLE_DRV, IDS_HINT_ENABLE },
+    { IDC_DISABLE_DRV, IDS_HINT_DISABLE },
+    { IDC_UPDATE_DRV, IDS_HINT_UPDATE },  
+    { IDC_UNINSTALL_DRV, IDS_HINT_UNINSTALL },
+    { IDC_ADD_HARDWARE, IDS_HINT_ADD },
+    
 
     // View Menu
     { IDC_DEVBYTYPE, IDS_HINT_DEV_BY_TYPE},
     { IDC_DEVBYCONN, IDS_HINT_DEV_BY_CONN},
     { IDC_RESBYTYPE, IDS_HINT_RES_BY_TYPE},
     { IDC_RESBYCONN, IDS_HINT_RES_BY_TYPE},
+    { IDC_SHOWHIDDEN, IDS_HINT_SHOW_HIDDEN },
 
     { IDC_ABOUT, IDS_HINT_ABOUT }
 
 };
+
+
+
+
+#define IDS_HINT_BLANK          20000
+#define IDS_HINT_PROPERTIES     20001
+#define IDS_HINT_SCAN           20002
+#define IDS_HINT_ENABLE         20003
+#define IDS_HINT_DISABLE        20004
+#define IDS_HINT_UPDATE         20005
+#define IDS_HINT_UNINSTALL      20006
+#define IDS_HINT_ADD            20007
+#define IDS_HINT_ABOUT          20008
+#define IDS_HINT_EXIT           20009
 
 // system menu hints
 static const MENU_HINT SystemMenuHintTable[] =
@@ -188,6 +205,17 @@
                         HintId);
 
     return Found;
+}
+
+void
+CMainWindow::UpdateStatusBar(
+    _In_ bool InMenuLoop
+    )
+{
+    SendMessageW(m_hStatusBar,
+                 SB_SIMPLE,
+                 (WPARAM)InMenuLoop,
+                 0);
 }
 
 bool
@@ -708,6 +736,18 @@
             break;
         }
 
+        case WM_ENTERMENULOOP:
+        {
+            pThis->UpdateStatusBar(true);
+            break;
+        }
+
+        case WM_EXITMENULOOP:
+        {
+            pThis->UpdateStatusBar(false);
+            break;
+        }
+
         case WM_CLOSE:
         {
             // Destroy the main window

Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h?rev=68184&r1=68183&r2=68184&view=diff
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] Thu Jun 18 
11:02:52 2015
@@ -53,6 +53,10 @@
         UINT uID
         );
 
+    void UpdateStatusBar(
+        _In_ bool InMenuLoop
+        );
+
     bool MainWndMenuHint(
         WORD CmdId,
         const MENU_HINT *HintArray,

Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h?rev=68184&r1=68183&r2=68184&view=diff
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h   [iso-8859-1] Thu Jun 18 
11:02:52 2015
@@ -42,16 +42,21 @@
 
 /* menu hints */
 #define IDS_HINT_BLANK          20000
-#define IDS_HINT_REFRESH        20002
-#define IDS_HINT_PROP           20003
-#define IDS_HINT_HELP           20004
-#define IDS_HINT_ABOUT          20005
-#define IDS_HINT_EXIT           20006
+#define IDS_HINT_PROPERTIES     20001
+#define IDS_HINT_SCAN           20002
+#define IDS_HINT_ENABLE         20003
+#define IDS_HINT_DISABLE        20004
+#define IDS_HINT_UPDATE         20005
+#define IDS_HINT_UNINSTALL      20006
+#define IDS_HINT_ADD            20007
+#define IDS_HINT_ABOUT          20008
+#define IDS_HINT_EXIT           20009
 
 #define IDS_HINT_DEV_BY_TYPE    20020
 #define IDS_HINT_DEV_BY_CONN    20021
 #define IDS_HINT_RES_BY_TYPE    20022
 #define IDS_HINT_RES_BY_CONN    20023
+#define IDS_HINT_SHOW_HIDDEN    20024
 
 /* system menu hints */
 #define IDS_HINT_SYS_RESTORE    21001
@@ -60,4 +65,3 @@
 #define IDS_HINT_SYS_MINIMIZE   21004
 #define IDS_HINT_SYS_MAXIMIZE   21005
 #define IDS_HINT_SYS_CLOSE      21006
-

Modified: trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc?rev=68184&r1=68183&r2=68184&view=diff
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc        [iso-8859-1] 
(original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc        [iso-8859-1] 
Thu Jun 18 11:02:52 2015
@@ -61,16 +61,21 @@
 BEGIN
   IDS_APPNAME           "ReactOS Device Manager"
   IDS_HINT_BLANK        " "
+  IDS_HINT_PROPERTIES   " Open property dialog for the current selection."
+  IDS_HINT_SCAN         " Scan for changed or new plug and play devices."
+  IDS_HINT_ENABLE       " Enables the selected device."
+  IDS_HINT_DISABLE      " Disables the selected device."
+  IDS_HINT_UPDATE       " Launches the Update Driver Software wizard for the 
selected device."
+  IDS_HINT_UNINSTALL    " Uninstalls the driver for the selected device."
+  IDS_HINT_ADD          " Adds a legacy (non-Plug and Play) device to the 
computer." 
+  IDS_HINT_ABOUT        " About ReactOS Device Manager."
   IDS_HINT_EXIT         " Exits the program."
-  IDS_HINT_REFRESH      " Scan for changed or new Plug and Play devices."
-  IDS_HINT_PROP         " Open property dialog for the current selection."
-  IDS_HINT_HELP         " Display help window."
-  IDS_HINT_ABOUT        " About ReactOS Device Manager."
 
-  IDS_HINT_DEV_BY_TYPE  "Displays devices by hardware type"
-  IDS_HINT_DEV_BY_CONN  "Displays devices by connection"
-  IDS_HINT_RES_BY_TYPE  "Displays resources by type"
-  IDS_HINT_RES_BY_CONN  "Displays resources by connection type"
+  IDS_HINT_DEV_BY_TYPE  " Displays devices by hardware type."
+  IDS_HINT_DEV_BY_CONN  " Displays devices by connection."
+  IDS_HINT_RES_BY_TYPE  " Displays resources by type."
+  IDS_HINT_RES_BY_CONN  " Displays resources by connection type."
+  IDS_HINT_SHOW_HIDDEN  " Displays legacy devices and devices that are no 
longer installed."
 
   IDS_HINT_SYS_RESTORE  " Restores this window to normal size."
   IDS_HINT_SYS_MOVE     " Moves this window."


Reply via email to