Author: ekohl
Date: Thu Mar 22 22:38:06 2012
New Revision: 56214
URL:
http://svn.reactos.org/svn/reactos?rev=56214&view=rev
Log:
[DEVMGMT]
Implement the "Show hidden devices" feature.
Modified:
trunk/reactos/base/applications/mscutils/devmgmt/enumdevices.c
trunk/reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/en-US.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc
trunk/reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc
trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c
trunk/reactos/base/applications/mscutils/devmgmt/precomp.h
trunk/reactos/base/applications/mscutils/devmgmt/resource.h
Modified: trunk/reactos/base/applications/mscutils/devmgmt/enumdevices.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/enumdevices.c [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/enumdevices.c [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -136,11 +136,13 @@
static INT
EnumDeviceClasses(INT ClassIndex,
+ BOOL ShowHidden,
LPTSTR DevClassName,
LPTSTR DevClassDesc,
BOOL *DevPresent,
INT *ClassImage,
- BOOL *IsUnknown)
+ BOOL *IsUnknown,
+ BOOL *IsHidden)
{
GUID ClassGuid;
HKEY KeyClass;
@@ -150,6 +152,7 @@
*DevPresent = FALSE;
*DevClassName = _T('\0');
+ *IsHidden = FALSE;
Ret = CM_Enumerate_Classes(ClassIndex,
&ClassGuid,
@@ -172,6 +175,11 @@
/* This case is special because these devices don't show up with normal class
enumeration */
*IsUnknown = IsEqualGUID(&ClassGuid, &GUID_DEVCLASS_UNKNOWN);
+
+ if (ShowHidden == FALSE &&
+ (IsEqualGUID(&ClassGuid, &GUID_DEVCLASS_LEGACYDRIVER) ||
+ IsEqualGUID(&ClassGuid, &GUID_DEVCLASS_VOLUME)))
+ *IsHidden = TRUE;
if (SetupDiClassNameFromGuid(&ClassGuid,
ClassName,
@@ -327,7 +335,8 @@
VOID
ListDevicesByType(HWND hTreeView,
- HTREEITEM hRoot)
+ HTREEITEM hRoot,
+ BOOL bShowHidden)
{
HTREEITEM hDevItem;
TCHAR DevName[MAX_DEV_LEN];
@@ -338,17 +347,20 @@
INT index = 0;
INT DevImage;
BOOL IsUnknown = FALSE;
+ BOOL IsHidden = FALSE;
do
{
ClassRet = EnumDeviceClasses(index,
+ bShowHidden,
DevName,
DevDesc,
&DevExist,
&DevImage,
- &IsUnknown);
-
- if ((ClassRet != -1) && (DevExist))
+ &IsUnknown,
+ &IsHidden);
+
+ if ((ClassRet != -1) && (DevExist) && !IsHidden)
{
TCHAR DeviceName[MAX_DEV_LEN];
INT DevIndex = 0;
@@ -442,7 +454,8 @@
static HTREEITEM
AddDeviceToTree(HWND hTreeView,
HTREEITEM hRoot,
- DEVINST dnDevInst)
+ DEVINST dnDevInst,
+ BOOL bShowHidden)
{
TCHAR DevName[MAX_DEV_LEN];
TCHAR FriendlyName[MAX_DEV_LEN];
@@ -452,6 +465,28 @@
LPTSTR DeviceID;
INT ClassImage = 24;
CONFIGRET cr;
+
+ ulLength = MAX_GUID_STRING_LEN * sizeof(TCHAR);
+ cr = CM_Get_DevNode_Registry_Property(dnDevInst,
+ CM_DRP_CLASSGUID,
+ NULL,
+ ClassGuidString,
+ &ulLength,
+ 0);
+ if (cr == CR_SUCCESS)
+ {
+ pSetupGuidFromString(ClassGuidString, &ClassGuid);
+
+ if (bShowHidden == FALSE &&
+ (IsEqualGUID(&ClassGuid, &GUID_DEVCLASS_LEGACYDRIVER) ||
+ IsEqualGUID(&ClassGuid, &GUID_DEVCLASS_VOLUME)))
+ return NULL;
+ }
+ else
+ {
+ /* It's a device with no driver */
+ ClassGuid = GUID_DEVCLASS_UNKNOWN;
+ }
cr = CM_Get_Device_ID(dnDevInst,
DevName,
@@ -480,23 +515,6 @@
return NULL;
}
- ulLength = MAX_GUID_STRING_LEN * sizeof(TCHAR);
- cr = CM_Get_DevNode_Registry_Property(dnDevInst,
- CM_DRP_CLASSGUID,
- NULL,
- ClassGuidString,
- &ulLength,
- 0);
- if (cr == CR_SUCCESS)
- {
- pSetupGuidFromString(ClassGuidString, &ClassGuid);
- }
- else
- {
- /* It's a device with no driver */
- ClassGuid = GUID_DEVCLASS_UNKNOWN;
- }
-
if (!SetupDiGetClassImageIndex(&ImageListData,
&ClassGuid,
&ClassImage))
@@ -532,7 +550,8 @@
static VOID
EnumChildDevices(HWND hTreeView,
HTREEITEM hRoot,
- DEVINST dnParentDevInst)
+ DEVINST dnParentDevInst,
+ BOOL bShowHidden)
{
HTREEITEM hDevItem;
DEVINST dnDevInst;
@@ -546,13 +565,15 @@
hDevItem = AddDeviceToTree(hTreeView,
hRoot,
- dnDevInst);
- if (hDevItem == NULL)
- return;
-
- EnumChildDevices(hTreeView,
- hDevItem,
- dnDevInst);
+ dnDevInst,
+ bShowHidden);
+ if (hDevItem != NULL)
+ {
+ EnumChildDevices(hTreeView,
+ hDevItem,
+ dnDevInst,
+ bShowHidden);
+ }
while (cr == CR_SUCCESS)
{
@@ -564,13 +585,15 @@
hDevItem = AddDeviceToTree(hTreeView,
hRoot,
- dnDevInst);
- if (hDevItem == NULL)
- break;
-
- EnumChildDevices(hTreeView,
- hDevItem,
- dnDevInst);
+ dnDevInst,
+ bShowHidden);
+ if (hDevItem != NULL)
+ {
+ EnumChildDevices(hTreeView,
+ hDevItem,
+ dnDevInst,
+ bShowHidden);
+ }
}
(void)TreeView_SortChildren(hTreeView,
@@ -581,7 +604,8 @@
VOID
ListDevicesByConnection(HWND hTreeView,
- HTREEITEM hRoot)
+ HTREEITEM hRoot,
+ BOOL bShowHidden)
{
DEVINST devInst;
CONFIGRET cr;
@@ -592,7 +616,8 @@
if (cr == CR_SUCCESS)
EnumChildDevices(hTreeView,
hRoot,
- devInst);
+ devInst,
+ bShowHidden);
(void)TreeView_Expand(hTreeView,
hRoot,
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "УÑÑÑойÑÑваÑа ÑпоÑед ÑвÑÑзванеÑо",
IDC_DEVBYCONN
MENUITEM "СÑедÑÑваÑа ÑпоÑед вида", IDC_RESBYTYPE,
GRAYED
MENUITEM "СÑедÑÑваÑа ÑпоÑед ÑвÑÑзванеÑо",
IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "ÐомоÑ"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/cs-CZ.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "ZaÅÃzenà podle pÅipojenÃ", IDC_DEVBYCONN
MENUITEM "ProstÅedky podle typu", IDC_RESBYTYPE, GRAYED
MENUITEM "ProstÅedky podle pÅipojenÃ", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "NápovÄda"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -1,4 +1,4 @@
-LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
+LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
IDR_MAINMENU MENU
BEGIN
@@ -20,6 +20,8 @@
MENUITEM "Geräte nach Verbindung", IDC_DEVBYCONN
MENUITEM "Resourcen nach Typ", IDC_RESBYTYPE, GRAYED
MENUITEM "Resourcen nach Verbindung", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Ausgeblendete Geräte anzeigen", IDC_SHOWHIDDEN
END
POPUP "&?"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "ΣÏ
ÏκεÏ
ÎÏ Î±Î½Î¬ ÏÏνδεÏη", IDC_DEVBYCONN
MENUITEM "ΠηγÎÏ Î±Î½Î¬ ÏÏÏο", IDC_RESBYTYPE, GRAYED
MENUITEM "ΠηγÎÏ Î±Î½Î¬ ÏÏνδεÏη", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Îοήθεια"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/en-US.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/en-US.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "Devices by connection", IDC_DEVBYCONN
MENUITEM "Resources by type", IDC_RESBYTYPE, GRAYED
MENUITEM "Resources by connection", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Help"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -25,6 +25,8 @@
MENUITEM "Dispositivos por conexión", IDC_DEVBYCONN
MENUITEM "Recursos por tipo", IDC_RESBYTYPE, GRAYED
MENUITEM "Recursos por conexión", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Ayuda"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "Périphériques par connexion", IDC_DEVBYCONN
MENUITEM "Ressources par type", IDC_RESBYTYPE, GRAYED
MENUITEM "Ressources par connexion", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Aide"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "Device dengan koneksi", IDC_DEVBYCONN
MENUITEM "Resource dengan tipe", IDC_RESBYTYPE, GRAYED
MENUITEM "Resource dengan koneksi", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Bantuan"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "Dispositivi per connessione", IDC_DEVBYCONN
MENUITEM "Risorse per tipo", IDC_RESBYTYPE, GRAYED
MENUITEM "Risorse per connessione", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Aiuto"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "ããã¤ã¹ (æ¥ç¶å¥)", IDC_DEVBYCONN
MENUITEM "ãªã½ ã¼ã¹ (種é¡å¥)", IDC_RESBYTYPE, GRAYED
MENUITEM "ãªã½ ã¼ã¹ (æ¥ç¶å¥)", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "ãã«ã"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -24,6 +24,8 @@
MENUITEM "Devices by connection", IDC_DEVBYCONN
MENUITEM "Resources by type", IDC_RESBYTYPE, GRAYED
MENUITEM "Resources by connection", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "ëìë§"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -20,6 +20,8 @@
MENUITEM "Enheter etter tilkobling", IDC_DEVBYCONN
MENUITEM "Ressurser etter type", IDC_RESBYTYPE, GRAYED
MENUITEM "Ressurser etter tilkobling", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Hjelp"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -27,6 +27,8 @@
MENUITEM "Ur&zÄ
dzenia wedÅug poÅÄ
czenia", IDC_DEVBYCONN
MENUITEM "Zaso&by wedÅug typu", IDC_RESBYTYPE, GRAYED
MENUITEM "Za&soby wedÅug poÅÄ
czenia", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Pomo&c"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -21,6 +21,8 @@
MENUITEM "Dispozitive dupÄ &conexiune", IDC_DEVBYCONN
MENUITEM "Resurse dupÄ t&ip", IDC_RESBYTYPE, GRAYED
MENUITEM "Resurse dupÄ c&onexiune", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "&?"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -22,6 +22,8 @@
MENUITEM "УÑÑÑойÑÑва по подклÑÑениÑ", IDC_DEVBYCONN
MENUITEM "РеÑÑÑÑÑ Ð¿Ð¾ ÑипÑ", IDC_RESBYTYPE, GRAYED
MENUITEM "РеÑÑÑÑÑ Ð¿Ð¾ подклÑÑениÑ", IDC_RESBYCONN,
GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "СпÑавка"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -25,6 +25,8 @@
MENUITEM "Zariadenia podľa pripojenia", IDC_DEVBYCONN
MENUITEM "Prostriedky podľa typu", IDC_RESBYTYPE, GRAYED
MENUITEM "Prostriedky podľa pripojenia", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "PomocnÃk"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -27,6 +27,8 @@
MENUITEM "Enheter efter koppling", IDC_DEVBYCONN
MENUITEM "Resurcer efter typ", IDC_RESBYTYPE, GRAYED
MENUITEM "Resurcer efter koppling", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "Hjälp"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -28,6 +28,8 @@
MENUITEM
"à¸à¸¸à¸à¸à¸£à¸à¹à¹à¸à¹à¸à¸à¸²à¸¡à¸à¸²à¸£à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸",
IDC_DEVBYCONN
MENUITEM "à¹à¸«à¸¥à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸²à¸¡à¸à¸£à¸°à¹à¸ à¸",
IDC_RESBYTYPE, GRAYED
MENUITEM
"à¹à¸«à¸¥à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸²à¸¡à¸à¸²à¸£à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸",
IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "à¸à¹à¸§à¸¢à¹à¸«à¸¥à¸·à¸"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -28,6 +28,8 @@
MENUITEM "ÐÑиÑÑÑÐ¾Ñ Ð·Ð° пÑдклÑÑеннÑм", IDC_DEVBYCONN
MENUITEM "РеÑÑÑÑи за Ñипом", IDC_RESBYTYPE, GRAYED
MENUITEM "РеÑÑÑÑи за пÑдклÑÑеннÑм", IDC_RESBYCONN,
GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "ÐовÑдка"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -24,6 +24,8 @@
MENUITEM "设å¤ï¼æè¿æ¥", IDC_DEVBYCONN
MENUITEM "èµæºï¼æç±»å", IDC_RESBYTYPE, GRAYED
MENUITEM "èµæºï¼æè¿æ¥", IDC_RESBYCONN, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Show hidden devices", IDC_SHOWHIDDEN
END
POPUP "帮å©"
BEGIN
Modified: trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -217,11 +217,11 @@
switch (Info->Display)
{
case DevicesByType:
- ListDevicesByType(Info->hTreeView, hRoot);
+ ListDevicesByType(Info->hTreeView, hRoot, Info->bShowHidden);
break;
case DevicesByConnection:
- ListDevicesByConnection(Info->hTreeView, hRoot);
+ ListDevicesByConnection(Info->hTreeView, hRoot,
Info->bShowHidden);
break;
default:
@@ -238,6 +238,9 @@
UpdateViewMenu(PMAIN_WND_INFO Info)
{
UINT id = IDC_DEVBYTYPE;
+ HMENU hMenu;
+
+ hMenu = GetMenu(Info->hMainWnd);
switch (Info->Display)
{
@@ -255,11 +258,15 @@
break;
}
- CheckMenuRadioItem(GetMenu(Info->hMainWnd),
+ CheckMenuRadioItem(hMenu,
IDC_DEVBYTYPE,
IDC_RESBYCONN,
id,
MF_BYCOMMAND);
+
+ CheckMenuItem(hMenu,
+ IDC_SHOWHIDDEN,
+ MF_BYCOMMAND | (Info->bShowHidden) ? MF_CHECKED : MF_UNCHECKED);
}
@@ -598,6 +605,14 @@
OnRefresh(Info);
}
break;
+
+ case IDC_SHOWHIDDEN:
+ {
+ Info->bShowHidden = !Info->bShowHidden;
+ UpdateViewMenu(Info);
+ OnRefresh(Info);
+ }
+ break;
}
}
@@ -794,6 +809,7 @@
{
Info->nCmdShow = nCmdShow;
Info->Display = DevicesByType;
+ Info->bShowHidden = TRUE;
hMainWnd = CreateWindowEx(WS_EX_WINDOWEDGE,
szMainWndClass,
Modified: trunk/reactos/base/applications/mscutils/devmgmt/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/precomp.h [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -40,6 +40,7 @@
int nCmdShow;
DISPLAY_TYPE Display;
+ BOOL bShowHidden;
/* status flags */
UINT InMenuLoop : 1;
@@ -71,8 +72,8 @@
VOID FreeDeviceStrings(HWND hTreeView);
VOID OpenPropSheet(HWND hTreeView, HTREEITEM hItem);
HTREEITEM InitTreeView(HWND hTreeView);
-VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot);
-VOID ListDevicesByConnection(HWND hTreeView, HTREEITEM hRoot);
+VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
+VOID ListDevicesByConnection(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
/* misc.c */
Modified: trunk/reactos/base/applications/mscutils/devmgmt/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/devmgmt/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/devmgmt/resource.h [iso-8859-1] Thu Mar 22
22:38:06 2012
@@ -23,6 +23,7 @@
#define IDC_DEVBYCONN 105
#define IDC_RESBYTYPE 106
#define IDC_RESBYCONN 107
+#define IDC_SHOWHIDDEN 108
/* tooltips */
#define IDS_TOOLTIP_PROP 6000