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