fix msvc warnings
[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 #ifdef _MSC_VER
15 #pragma warning(disable : 4100)
16 #endif
17 /* Property page dialog callback */
18 INT_PTR CALLBACK
19 GeneralPageProc(HWND hwndDlg,
20 UINT uMsg,
21 WPARAM wParam,
22 LPARAM lParam)
23 {
24
25 switch (uMsg)
26 {
27 case WM_INITDIALOG:
28
29 break;
30
31 case WM_COMMAND:
32 switch(LOWORD(wParam))
33 {
34 case IDC_START:
35 break;
36
37 case IDC_STOP:
38
39 break;
40 }
41 break;
42
43 case WM_DESTROY:
44 break;
45
46 case WM_NOTIFY:
47 {
48 LPNMHDR lpnm = (LPNMHDR)lParam;
49
50 switch (lpnm->code)
51
52 default:
53 break;
54 }
55 break;
56 }
57
58 return FALSE;
59 }
60
61
62
63 static VOID
64 InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
65 {
66 ZeroMemory(psp, sizeof(PROPSHEETPAGE));
67 psp->dwSize = sizeof(PROPSHEETPAGE);
68 psp->dwFlags = PSP_DEFAULT;
69 psp->hInstance = hInstance;
70 psp->pszTemplate = MAKEINTRESOURCE(idDlg);
71 psp->pfnDlgProc = DlgProc;
72 }
73
74
75 LONG APIENTRY
76 PropSheets(HWND hwnd)
77 {
78 PROPSHEETHEADER psh;
79 PROPSHEETPAGE psp[1];
80 TCHAR Caption[256];
81
82 LoadString(hInstance, IDS_PROP_SHEET, Caption, sizeof(Caption) / sizeof(TCHAR));
83
84 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
85 psh.dwSize = sizeof(PROPSHEETHEADER);
86 psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
87 psh.hwndParent = NULL;
88 psh.hInstance = hInstance;
89 psh.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SM_ICON));
90 psh.pszCaption = Caption;
91 psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
92 psh.nStartPage = 0;
93 psh.ppsp = psp;
94
95 InitPropSheetPage(&psp[0], IDD_DLG_GENERAL, GeneralPageProc);
96 //logon
97 //recovery
98 //dependancies
99
100 return (LONG)(PropertySheet(&psh) != -1);
101 }