- list items alphabetically
authorGed Murphy <gedmurphy@reactos.org>
Sun, 8 Jan 2006 01:18:49 +0000 (01:18 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Sun, 8 Jan 2006 01:18:49 +0000 (01:18 +0000)
- double click opens properties dialog

svn path=/trunk/; revision=20692

reactos/subsys/system/servman/query.c
reactos/subsys/system/servman/servman.c
reactos/subsys/system/servman/servman.h

index 24877d7..c78582d 100644 (file)
@@ -32,6 +32,7 @@ RefreshServiceList(VOID)
     TCHAR szStatus[128];\r
     DWORD NumServices = 0;\r
     DWORD Index;\r
+    LPCTSTR Path = _T("System\\CurrentControlSet\\Services\\%s");\r
 \r
     NumServices = GetServiceList();\r
 \r
@@ -67,7 +68,7 @@ RefreshServiceList(VOID)
             DWORD dwValueSize;\r
 \r
              /* open the registry key for the service */\r
-            _sntprintf(buf, 300, _T("System\\CurrentControlSet\\Services\\%s"),\r
+            _sntprintf(buf, 300, Path,\r
                       pServiceStatus[Index].lpServiceName);\r
 \r
             if( RegOpenKeyEx(HKEY_LOCAL_MACHINE,\r
index fd4a624..4339af8 100644 (file)
@@ -39,7 +39,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 \r
             hListView = CreateWindow(WC_LISTVIEW,\r
                                      NULL,\r
-                                     WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | LVS_EDITLABELS,\r
+                                     WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | \r
+                                     LVS_EDITLABELS | LVS_SORTASCENDING,\r
                                      0, 0, 0, 0, /* sized via WM_SIZE */\r
                                      hwnd,\r
                                      (HMENU) IDC_SERVLIST,\r
@@ -196,8 +197,18 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                break;\r
 \r
                case WM_NOTIFY:\r
+        {\r
+            LPNMITEMACTIVATE item;\r
+\r
             switch (((LPNMHDR) lParam)->code)\r
             {\r
+\r
+                       case NM_DBLCLK:\r
+                               item = (LPNMITEMACTIVATE) lParam;\r
+                               PropSheets(hwnd);\r
+\r
+                               break;\r
+            \r
                 case TTN_GETDISPINFO:\r
                 {\r
                     LPTOOLTIPTEXT lpttt;\r
@@ -246,6 +257,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 default:\r
                 break;\r
             }\r
+        }\r
         break;\r
 \r
                case WM_CLOSE:\r
index 23ad45e..b750e04 100644 (file)
@@ -8,6 +8,8 @@
 #include <commctrl.h>\r
 #include "resource.h"\r
 \r
+#define MAX_KEY_LENGTH 256\r
+\r
 BOOL RefreshServiceList(VOID);\r
 \r
 BOOL CALLBACK\r