ReactOS  0.4.15-dev-4921-g25fcdc5
advanced.c File Reference
#include "precomp.h"
Include dependency graph for advanced.c:

Go to the source code of this file.

Functions

static VOID OnOK (HWND hwndDlg)
 
static VOID OnInitSysSettingsDialog (HWND hwndDlg)
 
INT_PTR CALLBACK SysSettingsDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AdvancedPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Variables

static TCHAR BugLink [] = _T("http://jira.reactos.org/")
 
static TCHAR ReportAsWorkstationKey [] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version")
 

Function Documentation

◆ AdvancedPageProc()

INT_PTR CALLBACK AdvancedPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 117 of file advanced.c.

121 {
123 
124  switch (uMsg)
125  {
126  case WM_INITDIALOG:
127  break;
128 
129  case WM_COMMAND:
130  {
131  switch (LOWORD(wParam))
132  {
133  case IDC_PERFOR:
136  hwndDlg,
138  break;
139 
140  case IDC_USERPROFILE:
143  hwndDlg,
145  break;
146 
147  case IDC_STAREC:
150  hwndDlg,
152  break;
153 
154  case IDC_SYSSETTINGS:
157  hwndDlg,
159  break;
160 
161  case IDC_ENVVAR:
164  hwndDlg,
166  break;
167 
168  case IDC_ERRORREPORT:
170  _T("open"),
171  BugLink,
172  NULL,
173  NULL,
174  SW_SHOWNORMAL);
175  break;
176  }
177  }
178 
179  break;
180  }
181 
182  return FALSE;
183 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDC_USERPROFILE
Definition: resource.h:97
#define IDD_STARTUPRECOVERY
Definition: resource.h:172
#define IDC_PERFOR
Definition: resource.h:96
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define IDD_ENVIRONMENT_VARIABLES
Definition: resource.h:127
#define IDD_SYSSETTINGS
Definition: resource.h:101
HINSTANCE hApplet
Definition: access.c:17
WPARAM wParam
Definition: combotst.c:138
INT_PTR CALLBACK UserProfileDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: userprofile.c:813
#define DialogBox
Definition: winuser.h:5741
#define FALSE
Definition: types.h:117
static TCHAR BugLink[]
Definition: advanced.c:13
#define ShellExecute
Definition: shellapi.h:691
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: environment.c:1831
#define IDD_USERPROFILE
Definition: resource.h:105
#define IDC_ENVVAR
Definition: resource.h:94
INT_PTR CALLBACK StartRecDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: startrec.c:687
#define _T(x)
Definition: vfdio.h:22
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: virtmem.c:696
#define WM_COMMAND
Definition: winuser.h:1727
INT_PTR CALLBACK SysSettingsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:87
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define NULL
Definition: types.h:112
#define WM_INITDIALOG
Definition: winuser.h:1726
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_ERRORREPORT
Definition: resource.h:98
#define IDD_VIRTMEM
Definition: resource.h:155
#define IDC_STAREC
Definition: resource.h:95
#define IDC_SYSSETTINGS
Definition: resource.h:93

◆ OnInitSysSettingsDialog()

static VOID OnInitSysSettingsDialog ( HWND  hwndDlg)
static

Definition at line 51 of file advanced.c.

52 {
53  HKEY hKey;
54  DWORD dwVal;
55  DWORD dwType = REG_DWORD;
56  DWORD cbData = sizeof(DWORD);
57 
60  0,
61  KEY_READ,
62  &hKey) == ERROR_SUCCESS)
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 }
#define RegQueryValueEx
Definition: winreg.h:524
#define ERROR_SUCCESS
Definition: deptool.c:10
static TCHAR ReportAsWorkstationKey[]
Definition: advanced.c:14
#define KEY_READ
Definition: nt_native.h:1023
#define DWORD
Definition: nt_native.h:44
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
#define BM_SETCHECK
Definition: winuser.h:1908
#define _T(x)
Definition: vfdio.h:22
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_REPORTASWORKSTATION
Definition: resource.h:102
#define RegOpenKeyEx
Definition: winreg.h:520
FxAutoRegKey hKey
#define BST_CHECKED
Definition: winuser.h:197
#define REG_DWORD
Definition: sdbapi.c:596
#define RegCloseKey(hKey)
Definition: registry.h:47
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SysSettingsDlgProc().

◆ OnOK()

static VOID OnOK ( HWND  hwndDlg)
static

Definition at line 18 of file advanced.c.

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,
34  KEY_WRITE,
35  NULL,
36  &hKey,
37  NULL) == ERROR_SUCCESS)
38  {
40  _T("ReportAsWorkstation"),
41  0,
42  REG_DWORD,
43  (LPBYTE)&ReportAsWorkstation,
44  sizeof(DWORD));
45 
47  }
48 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static TCHAR ReportAsWorkstationKey[]
Definition: advanced.c:14
unsigned char * LPBYTE
Definition: typedefs.h:53
#define BM_GETCHECK
Definition: winuser.h:1905
#define KEY_WRITE
Definition: nt_native.h:1031
#define _T(x)
Definition: vfdio.h:22
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_REPORTASWORKSTATION
Definition: resource.h:102
FxAutoRegKey hKey
#define NULL
Definition: types.h:112
#define BST_CHECKED
Definition: winuser.h:197
#define REG_DWORD
Definition: sdbapi.c:596
#define RegCloseKey(hKey)
Definition: registry.h:47
#define RegSetValueEx
Definition: winreg.h:533
#define RegCreateKeyEx
Definition: winreg.h:501
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SysSettingsDlgProc().

◆ SysSettingsDlgProc()

INT_PTR CALLBACK SysSettingsDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 87 of file advanced.c.

91 {
93 
94  switch (uMsg)
95  {
96  case WM_INITDIALOG:
97  OnInitSysSettingsDialog(hwndDlg);
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  break;
109  }
110 
111  return FALSE;
112 }
#define IDOK
Definition: winuser.h:824
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
static VOID OnOK(HWND hwndDlg)
Definition: advanced.c:18
static VOID OnInitSysSettingsDialog(HWND hwndDlg)
Definition: advanced.c:51
#define WM_COMMAND
Definition: winuser.h:1727
#define WM_INITDIALOG
Definition: winuser.h:1726
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by AdvancedPageProc().

Variable Documentation

◆ BugLink

TCHAR BugLink[] = _T("http://jira.reactos.org/")
static

Definition at line 13 of file advanced.c.

Referenced by AdvancedPageProc().

◆ ReportAsWorkstationKey

TCHAR ReportAsWorkstationKey[] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version")
static

Definition at line 14 of file advanced.c.

Referenced by OnInitSysSettingsDialog(), and OnOK().