- list items alphabetically

- double click opens properties dialog

svn path=/trunk/; revision=20692
This commit is contained in:
Ged Murphy
2006-01-08 01:18:49 +00:00
parent cd2b2bca16
commit e17d7c91c7
3 changed files with 17 additions and 2 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ RefreshServiceList(VOID)
TCHAR szStatus[128];
DWORD NumServices = 0;
DWORD Index;
LPCTSTR Path = _T("System\\CurrentControlSet\\Services\\%s");
NumServices = GetServiceList();
@@ -67,7 +68,7 @@ RefreshServiceList(VOID)
DWORD dwValueSize;
/* open the registry key for the service */
_sntprintf(buf, 300, _T("System\\CurrentControlSet\\Services\\%s"),
_sntprintf(buf, 300, Path,
pServiceStatus[Index].lpServiceName);
if( RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+13 -1
View File
@@ -39,7 +39,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
hListView = CreateWindow(WC_LISTVIEW,
NULL,
WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | LVS_EDITLABELS,
WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER |
LVS_EDITLABELS | LVS_SORTASCENDING,
0, 0, 0, 0, /* sized via WM_SIZE */
hwnd,
(HMENU) IDC_SERVLIST,
@@ -196,8 +197,18 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_NOTIFY:
{
LPNMITEMACTIVATE item;
switch (((LPNMHDR) lParam)->code)
{
case NM_DBLCLK:
item = (LPNMITEMACTIVATE) lParam;
PropSheets(hwnd);
break;
case TTN_GETDISPINFO:
{
LPTOOLTIPTEXT lpttt;
@@ -246,6 +257,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
default:
break;
}
}
break;
case WM_CLOSE:
+2
View File
@@ -8,6 +8,8 @@
#include <commctrl.h>
#include "resource.h"
#define MAX_KEY_LENGTH 256
BOOL RefreshServiceList(VOID);
BOOL CALLBACK