fix compile with msvc
[reactos.git] / reactos / subsys / system / msconfig / srvpage.c
1 #include <precomp.h>
2
3 HWND hServicesPage;
4 HWND hServicesListCtrl;
5 HWND hServicesDialog;
6
7 INT_PTR CALLBACK
8 ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
9 {
10 LV_COLUMN column;
11 TCHAR szTemp[256];
12 DWORD dwStyle;
13
14 switch (message) {
15 case WM_INITDIALOG:
16
17 hServicesListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST);
18 hServicesDialog = hDlg;
19
20 dwStyle = SendMessage(hServicesListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
21 dwStyle = dwStyle | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES;
22 SendMessage(hServicesListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
23
24 SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
25
26 // Initialize the application page's controls
27 column.mask = LVCF_TEXT | LVCF_WIDTH;
28
29 LoadString(hInst, IDS_SERVICES_COLUMN_SERVICE, szTemp, 256);
30 column.pszText = szTemp;
31 column.cx = 150;
32 ListView_InsertColumn(hServicesListCtrl, 0, &column);
33
34 column.mask = LVCF_TEXT | LVCF_WIDTH;
35 LoadString(hInst, IDS_SERVICES_COLUMN_VENDOR, szTemp, 256);
36 column.pszText = szTemp;
37 column.cx = 200;
38 ListView_InsertColumn(hServicesListCtrl, 1, &column);
39
40 column.mask = LVCF_TEXT | LVCF_WIDTH;
41 LoadString(hInst, IDS_SERVICES_COLUMN_STATUS, szTemp, 256);
42 column.pszText = szTemp;
43 column.cx = 70;
44 ListView_InsertColumn(hServicesListCtrl, 1, &column);
45
46 return TRUE;
47 }
48
49 return 0;
50 }