ReactOS  0.4.13-dev-563-g0561610
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:92
#define IDD_STARTUPRECOVERY
Definition: resource.h:155
#define IDC_PERFOR
Definition: resource.h:91
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define IDD_ENVIRONMENT_VARIABLES
Definition: resource.h:122
#define IDD_SYSSETTINGS
Definition: resource.h:96
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:602
#define DialogBox
Definition: winuser.h:5627
static TCHAR BugLink[]
Definition: advanced.c:13
#define ShellExecute
Definition: shellapi.h:689
smooth NULL
Definition: ftsmooth.c:416
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: environment.c:685
#define IDD_USERPROFILE
Definition: resource.h:100
#define IDC_ENVVAR
Definition: resource.h:89
INT_PTR CALLBACK StartRecDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: startrec.c:688
#define _T(x)
Definition: vfdio.h:22
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: virtmem.c:664
#define WM_COMMAND
Definition: winuser.h:1716
INT_PTR CALLBACK SysSettingsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:87
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_ERRORREPORT
Definition: resource.h:93
#define IDD_VIRTMEM
Definition: resource.h:138
#define IDC_STAREC
Definition: resource.h:90
#define IDC_SYSSETTINGS
Definition: resource.h:88

◆ 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  {
64  if (RegQueryValueEx(hKey,
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 
82  RegCloseKey(hKey);
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
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define BM_SETCHECK
Definition: winuser.h:1882
#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:97
#define RegOpenKeyEx
Definition: winreg.h:520
#define BST_CHECKED
Definition: winuser.h:197
#define REG_DWORD
Definition: sdbapi.c:596
#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  {
39  RegSetValueEx(hKey,
40  _T("ReportAsWorkstation"),
41  0,
42  REG_DWORD,
43  (LPBYTE)&ReportAsWorkstation,
44  sizeof(DWORD));
45 
46  RegCloseKey(hKey);
47  }
48 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static TCHAR ReportAsWorkstationKey[]
Definition: advanced.c:14
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
smooth NULL
Definition: ftsmooth.c:416
#define BM_GETCHECK
Definition: winuser.h:1879
#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:97
#define BST_CHECKED
Definition: winuser.h:197
#define REG_DWORD
Definition: sdbapi.c:596
#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 TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
static VOID OnOK(HWND hwndDlg)
Definition: advanced.c:18
static VOID OnInitSysSettingsDialog(HWND hwndDlg)
Definition: advanced.c:51
#define WM_COMMAND
Definition: winuser.h:1716
#define WM_INITDIALOG
Definition: winuser.h:1715
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().