d8a5b10975a5ef7158fdd120a0fb559e1463a659
[reactos.git] / reactos / subsys / system / servman / propsheet.c
1 /*
2 * PROJECT: ReactOS Services
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: subsys/system/servman/propsheet.c
5 * PURPOSE: Property dialog box message handler
6 * COPYRIGHT: Copyright 2005 Ged Murphy <gedmurphy@gmail.com>
7 *
8 */
9
10 #include "servman.h"
11
12 extern HINSTANCE hInstance;
13
14
15 /* Property page dialog callback */
16 INT_PTR CALLBACK
17 GeneralPageProc(HWND hwndDlg,
18 UINT uMsg,
19 WPARAM wParam,
20 LPARAM lParam)
21 {
22
23 switch (uMsg)
24 {
25 case WM_INITDIALOG:
26
27 break;
28
29 case WM_COMMAND:
30 switch(LOWORD(wParam))
31 {
32 case IDC_START:
33 break;
34
35 case IDC_STOP:
36
37 break;
38 }
39 break;
40
41 case WM_DESTROY:
42 break;
43
44 case WM_NOTIFY:
45 {
46 LPNMHDR lpnm = (LPNMHDR)lParam;
47
48 switch (lpnm->code)
49
50 default:
51 break;
52 }
53 break;
54 }
55
56 return FALSE;
57 }
58
59
60
61 static VOID
62 InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
63 {
64 ZeroMemory(psp, sizeof(PROPSHEETPAGE));
65 psp->dwSize = sizeof(PROPSHEETPAGE);
66 psp->dwFlags = PSP_DEFAULT;
67 psp->hInstance = hInstance;
68 psp->pszTemplate = MAKEINTRESOURCE(idDlg);
69 psp->pfnDlgProc = DlgProc;
70 }
71
72
73 LONG APIENTRY
74 PropSheets(HWND hwnd)
75 {
76 PROPSHEETHEADER psh;
77 PROPSHEETPAGE psp[1];
78 TCHAR Caption[256];
79
80 LoadString(hInstance, IDS_PROP_SHEET, Caption, sizeof(Caption) / sizeof(TCHAR));
81
82 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
83 psh.dwSize = sizeof(PROPSHEETHEADER);
84 psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
85 psh.hwndParent = NULL;
86 psh.hInstance = hInstance;
87 psh.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SM_ICON));
88 psh.pszCaption = Caption;
89 psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
90 psh.nStartPage = 0;
91 psh.ppsp = psp;
92
93 InitPropSheetPage(&psp[0], IDD_DLG_GENERAL, GeneralPageProc);
94 //logon
95 //recovery
96 //dependancies
97
98 return (LONG)(PropertySheet(&psh) != -1);
99 }