[CMAKE]
[reactos.git] / dll / cpl / sysdm / hardprof.c
1 /*
2 * PROJECT: ReactOS System Control Panel Applet
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/cpl/sysdm/hardprof.c
5 * PURPOSE: Modify hardware profiles
6 * COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
7 *
8 */
9
10 #include "precomp.h"
11
12 /* Property page dialog callback */
13 static INT_PTR CALLBACK
14 RenameProfDlgProc(HWND hwndDlg,
15 UINT uMsg,
16 WPARAM wParam,
17 LPARAM lParam)
18 {
19 UNREFERENCED_PARAMETER(lParam);
20 UNREFERENCED_PARAMETER(wParam);
21 UNREFERENCED_PARAMETER(hwndDlg);
22
23 switch (uMsg)
24 {
25 case WM_COMMAND:
26 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
27 {
28 EndDialog(hwndDlg,
29 LOWORD(wParam));
30 return TRUE;
31 }
32 break;
33 }
34 return FALSE;
35 }
36
37
38 /* Property page dialog callback */
39 INT_PTR CALLBACK
40 HardProfDlgProc(HWND hwndDlg,
41 UINT uMsg,
42 WPARAM wParam,
43 LPARAM lParam)
44 {
45 UNREFERENCED_PARAMETER(lParam);
46 UNREFERENCED_PARAMETER(wParam);
47 UNREFERENCED_PARAMETER(hwndDlg);
48
49 switch (uMsg)
50 {
51 case WM_INITDIALOG:
52 {
53 SendMessage(GetDlgItem(hwndDlg, IDC_HRDPROFUP),
54 BM_SETIMAGE,(WPARAM)IMAGE_ICON,
55 (LPARAM)(HANDLE)LoadIcon(hApplet, MAKEINTRESOURCE(IDI_UP)));
56 SendMessage(GetDlgItem(hwndDlg, IDC_HRDPROFDWN),
57 BM_SETIMAGE,(WPARAM)IMAGE_ICON,
58 (LPARAM)(HANDLE)LoadIcon(hApplet, MAKEINTRESOURCE(IDI_DOWN)));
59
60 SendDlgItemMessageW(hwndDlg, IDC_HRDPROFUPDWN, UDM_SETRANGE, (WPARAM) 0, (LPARAM) MAKELONG((short) 500, 0));
61 //SendDlgItemMessageW(hwndDlg, IDC_HRDPROFUPDWN, UDM_SETPOS, (WPARAM) 0, (LPARAM) MAKELONG((short) 30, 0));
62 }
63 break;
64
65 case WM_COMMAND:
66 switch (LOWORD(wParam))
67 {
68 case IDC_HRDPROFRENAME:
69 DialogBox(hApplet,
70 MAKEINTRESOURCE(IDD_RENAMEPROFILE),
71 hwndDlg,
72 (DLGPROC)RenameProfDlgProc);
73 break;
74
75 case IDOK:
76 case IDCANCEL:
77 EndDialog(hwndDlg,
78 LOWORD(wParam));
79 return TRUE;
80 }
81 break;
82 }
83
84 return FALSE;
85 }