ReactOS 0.4.15-dev-5666-gc548b97
advanced.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS System Control Panel Applet
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/cpl/sysdm/advanced.c
5 * PURPOSE: Memory, start-up and profiles settings
6 * COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
7 Copyright 2006 - 2009 Ged Murphy <gedmurphy@reactos.org>
8 *
9 */
10
11#include "precomp.h"
12
13static TCHAR BugLink[] = _T("http://jira.reactos.org/");
14static TCHAR ReportAsWorkstationKey[] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version");
15
16
17static VOID
18OnOK(HWND hwndDlg)
19{
20 HKEY hKey;
21 DWORD ReportAsWorkstation;
22
23 ReportAsWorkstation = (SendDlgItemMessageW(hwndDlg,
26 0,
27 0) == BST_CHECKED);
28
31 0,
32 NULL,
33 0,
35 NULL,
36 &hKey,
38 {
40 _T("ReportAsWorkstation"),
41 0,
43 (LPBYTE)&ReportAsWorkstation,
44 sizeof(DWORD));
45
47 }
48}
49
50static VOID
52{
53 HKEY hKey;
54 DWORD dwVal;
55 DWORD dwType = REG_DWORD;
56 DWORD cbData = sizeof(DWORD);
57
60 0,
63 {
65 _T("ReportAsWorkstation"),
66 0,
67 &dwType,
68 (LPBYTE)&dwVal,
69 &cbData) == ERROR_SUCCESS)
70 {
71 if (dwVal != FALSE)
72 {
73 // set the check box
74 SendDlgItemMessageW(hwndDlg,
78 0);
79 }
80 }
81
83 }
84}
85
88 UINT uMsg,
91{
93
94 switch (uMsg)
95 {
96 case WM_INITDIALOG:
98 break;
99
100 case WM_COMMAND:
101 switch (LOWORD(wParam))
102 {
103 case IDOK:
104 OnOK(hwndDlg);
105 EndDialog(hwndDlg, 0);
106 return TRUE;
107
108 case IDCANCEL:
109 EndDialog(hwndDlg, 0);
110 return TRUE;
111 }
112 break;
113 }
114
115 return FALSE;
116}
117
118
119/* Property page dialog callback */
122 UINT uMsg,
125{
127
128 switch (uMsg)
129 {
130 case WM_INITDIALOG:
131 break;
132
133 case WM_COMMAND:
134 {
135 switch (LOWORD(wParam))
136 {
137 case IDC_PERFOR:
140 hwndDlg,
142 break;
143
144 case IDC_USERPROFILE:
147 hwndDlg,
149 break;
150
151 case IDC_STAREC:
154 hwndDlg,
156 break;
157
158 case IDC_SYSSETTINGS:
161 hwndDlg,
163 break;
164
165 case IDC_ENVVAR:
168 hwndDlg,
170 break;
171
172 case IDC_ERRORREPORT:
174 _T("open"),
175 BugLink,
176 NULL,
177 NULL,
179 break;
180 }
181 }
182
183 break;
184 }
185
186 return FALSE;
187}
#define RegCloseKey(hKey)
Definition: registry.h:47
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:422
static TCHAR BugLink[]
Definition: advanced.c:13
static VOID OnInitSysSettingsDialog(HWND hwndDlg)
Definition: advanced.c:51
static TCHAR ReportAsWorkstationKey[]
Definition: advanced.c:14
INT_PTR CALLBACK SysSettingsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:87
static VOID OnOK(HWND hwndDlg)
Definition: advanced.c:18
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: environment.c:1823
INT_PTR CALLBACK UserProfileDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: userprofile.c:810
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: virtmem.c:821
INT_PTR CALLBACK StartRecDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: startrec.c:695
#define IDD_SYSSETTINGS
Definition: resource.h:102
#define IDC_USERPROFILE
Definition: resource.h:98
#define IDC_ERRORREPORT
Definition: resource.h:99
#define IDC_ENVVAR
Definition: resource.h:95
#define IDD_USERPROFILE
Definition: resource.h:106
#define IDD_ENVIRONMENT_VARIABLES
Definition: resource.h:128
#define IDC_SYSSETTINGS
Definition: resource.h:94
#define IDC_REPORTASWORKSTATION
Definition: resource.h:103
#define IDD_VIRTMEM
Definition: resource.h:156
#define IDC_STAREC
Definition: resource.h:96
#define IDD_STARTUPRECOVERY
Definition: resource.h:173
#define IDC_PERFOR
Definition: resource.h:97
#define CALLBACK
Definition: compat.h:35
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
#define DWORD
Definition: nt_native.h:44
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define LOWORD(l)
Definition: pedump.c:82
#define REG_DWORD
Definition: sdbapi.c:596
#define ShellExecute
Definition: shellapi.h:690
int32_t INT_PTR
Definition: typedefs.h:64
unsigned char * LPBYTE
Definition: typedefs.h:53
#define _T(x)
Definition: vfdio.h:22
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define RegOpenKeyEx
Definition: winreg.h:520
#define RegSetValueEx
Definition: winreg.h:533
#define RegCreateKeyEx
Definition: winreg.h:501
#define RegQueryValueEx
Definition: winreg.h:524
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define IDCANCEL
Definition: winuser.h:825
#define WM_COMMAND
Definition: winuser.h:1730
#define WM_INITDIALOG
Definition: winuser.h:1729
#define IDOK
Definition: winuser.h:824
#define BM_SETCHECK
Definition: winuser.h:1911
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define BST_CHECKED
Definition: winuser.h:197
#define DialogBox
Definition: winuser.h:5751
#define BM_GETCHECK
Definition: winuser.h:1908
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
char TCHAR
Definition: xmlstorage.h:189