gdihv: add a possibility to view all handles
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 25 Mar 2009 03:48:51 +0000 (03:48 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 25 Mar 2009 03:48:51 +0000 (03:48 +0000)
svn path=/trunk/; revision=40216

rosapps/applications/devutils/gdihv/handlelist.c
rosapps/applications/devutils/gdihv/proclist.c

index 9350832..a1a3a8f 100644 (file)
@@ -83,9 +83,10 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
        {\r
                pEntry = &GdiHandleTable[i];\r
                if ( ((ProcessId != (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) != 0)) ||\r
-                    ((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) )\r
+                    ((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) ||\r
+                     (ProcessId == (HANDLE)2) )\r
                {\r
-                       if (ProcessId == (HANDLE)1 ||\r
+                       if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 ||\r
                            ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc))\r
                        {\r
                                handle = GDI_HANDLE_CREATE(i, pEntry->Type);\r
index 2800cd7..9cc31c4 100644 (file)
@@ -70,7 +70,16 @@ ProcessList_Update(HWND hListCtrl)
        item.pszText = L"<deleted>";\r
        (void)ListView_InsertItem(hListCtrl, &item);\r
        item.pszText = strText;\r
-       wsprintf(strText, L"%#08x",1);\r
+       wsprintf(strText, L"%#08x", 1);\r
+       ListView_SetItemText(hListCtrl, 1, 1, strText);\r
+\r
+       /* Insert "all" */\r
+       item.iItem = 2;\r
+       item.lParam = 2;\r
+       item.pszText = L"<all>";\r
+       (void)ListView_InsertItem(hListCtrl, &item);\r
+       item.pszText = strText;\r
+       wsprintf(strText, L"%#08x", 2);\r
        ListView_SetItemText(hListCtrl, 1, 1, strText);\r
 \r
        if (!EnumProcesses(ProcessIds, sizeof(ProcessIds), &BytesReturned ))\r