ReactOS 0.4.15-dev-8339-g4028de8
generalpage.c File Reference
#include "precomp.h"
#include "fileutils.h"
#include "utils.h"
#include "comctl32supp.h"
#include "fileextractdialog.h"
Include dependency graph for generalpage.c:

Go to the source code of this file.

Functions

static VOID EnableSelectiveStartupControls (BOOL bEnable)
 
static VOID CheckSelectiveStartupControls (BOOL bCheck)
 
INT_PTR CALLBACK GeneralPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 

Variables

static LPCWSTR lpszRestoreProgPath1 = L"%SystemRoot%\\System32\\rstrui.exe"
 
static LPCWSTR lpszRestoreProgPath2 = L"%SystemRoot%\\System32\\restore\\rstrui.exe"
 
static HWND hGeneralPage = NULL
 
static BOOL bIsOriginalBootIni = TRUE
 

Function Documentation

◆ CheckSelectiveStartupControls()

static VOID CheckSelectiveStartupControls ( BOOL  bCheck)
static

Definition at line 41 of file generalpage.c.

42{
44
50
51 return;
52}
#define IDC_CBX_SYSTEM_INI
Definition: resource.h:27
#define IDC_CBX_USE_ORIGINAL_BOOTCFG
Definition: resource.h:29
#define IDC_CBX_LOAD_STARTUP_ITEMS
Definition: resource.h:28
#define IDC_CBX_LOAD_SYSTEM_SERVICES
Definition: resource.h:27
#define IDC_CBX_WIN_INI
Definition: resource.h:26
#define assert(x)
Definition: debug.h:53
static HWND hGeneralPage
Definition: generalpage.c:19
#define Button_SetCheck(hwndCtl, check)
Definition: windowsx.h:35
#define BST_UNCHECKED
Definition: winuser.h:199
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define BST_CHECKED
Definition: winuser.h:197

Referenced by GeneralPageWndProc().

◆ EnableSelectiveStartupControls()

static VOID EnableSelectiveStartupControls ( BOOL  bEnable)
static

Definition at line 23 of file generalpage.c.

24{
26
29
31
32 // EnableWindow(GetDlgItem(hGeneralPage, IDC_RB_USE_ORIGINAL_BOOTCAT), bEnable);
33 // EnableWindow(GetDlgItem(hGeneralPage, IDC_RB_USE_MODIFIED_BOOTCAT), (bEnable ? !bIsOriginalBootIni : FALSE));
34
37
38 return;
39}
_In_ BOOL bEnable
Definition: winddi.h:3426
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)

Referenced by GeneralPageWndProc().

◆ GeneralPageWndProc()

INT_PTR CALLBACK GeneralPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 55 of file generalpage.c.

56{
58
59 switch (message)
60 {
61 case WM_INITDIALOG:
62 {
63 hGeneralPage = hDlg;
65
66 /* Search for the restore program and enable its button if needed */
70 else
72
73#if 0
74 /* FIXME */
77#endif
78
79 return TRUE;
80 }
81
82 case WM_COMMAND:
83 {
84 switch (LOWORD(wParam))
85 {
87 {
88 /* Be sure that only this button is activated and the others are not */
90
94
96
98 break;
99 }
100
102 {
103 /* Be sure that only this button is activated and the others are not */
105
108
110 break;
111 }
112
114 {
115 /* Be sure that only this button is activated and the others are not */
117
120
121 break;
122 }
123
125 {
127
130
132
133 break;
134 }
135
137 {
138 // NOTE: 'err' variable defined for debugging purposes only.
142
143 break;
144 }
145
148 break;
149
150 default:
151 //break;
152 return FALSE;
153 }
154 break;
155 }
156
157 case WM_NOTIFY:
158 {
159 switch (((LPNMHDR)lParam)->code)
160 {
161 case PSN_APPLY:
162 {
163 // TODO: Try to apply the modifications to the system.
165 return TRUE;
166 }
167
168 case PSN_HELP:
169 {
170 MessageBoxW(hGeneralPage, L"Help not implemented yet!", L"Help", MB_ICONINFORMATION | MB_OK);
171 return TRUE;
172 }
173
174 case PSN_KILLACTIVE: // Is going to lose activation.
175 {
176 // Changes are always valid of course.
178 return TRUE;
179 }
180
181 case PSN_QUERYCANCEL:
182 {
183 // Allows cancellation.
185 return TRUE;
186 }
187
189 {
190 // SetWindowLongPtr(hGeneralPage, DWLP_MSGRESULT,
191 // (LONG_PTR)GetDlgItem(hGeneralPage, (bIsOriginalBootIni ? IDC_RB_NORMAL_STARTUP : IDC_RB_SELECTIVE_STARTUP)));
192 return TRUE;
193 }
194
195 //
196 // DO NOT TOUCH THESE NEXT MESSAGES, THEY ARE OK LIKE THIS...
197 //
198 case PSN_RESET: // Perform final cleaning, called before WM_DESTROY.
199 return TRUE;
200
201 case PSN_SETACTIVE: // Is going to gain activation.
202 {
204 return TRUE;
205 }
206
207 default:
208 break;
209 }
210
211 return FALSE;
212 }
213
214 default:
215 return FALSE;
216 }
217
218 return FALSE;
219}
BOOL MyFileExists(IN LPCWSTR lpszFilePath, OUT PWIN32_FIND_DATAW pFindData OPTIONAL)
Definition: fileutils.c:18
#define IDC_RB_NORMAL_STARTUP
Definition: resource.h:22
#define IDC_BTN_FILE_EXTRACTION
Definition: resource.h:31
#define IDC_RB_SELECTIVE_STARTUP
Definition: resource.h:24
#define IDC_BTN_SYSTEM_RESTORE_START
Definition: resource.h:30
#define IDD_FILE_EXTRACT_DIALOG
Definition: resource.h:16
#define IDC_RB_DIAGNOSTIC_STARTUP
Definition: resource.h:23
DWORD RunCommand(IN LPCWSTR lpszCommand, IN LPCWSTR lpszParameters, IN INT nShowCmd)
Definition: utils.c:132
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hInst
Definition: dxdiag.c:13
INT_PTR CALLBACK FileExtractDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define PSN_QUERYINITIALFOCUS
Definition: settings.cpp:98
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
VOID EnableCheckboxControls(HWND hDlg, BOOL bEnable)
Definition: generalpage.c:16
static VOID EnableSelectiveStartupControls(BOOL bEnable)
Definition: generalpage.c:23
static BOOL bIsOriginalBootIni
Definition: generalpage.c:20
static VOID CheckSelectiveStartupControls(BOOL bCheck)
Definition: generalpage.c:41
static LPCWSTR lpszRestoreProgPath1
Definition: generalpage.c:16
static LPCWSTR lpszRestoreProgPath2
Definition: generalpage.c:17
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_QUERYCANCEL
Definition: prsht.h:123
#define PropSheet_UnChanged(d, w)
Definition: prsht.h:358
#define PSN_KILLACTIVE
Definition: prsht.h:116
#define PSN_APPLY
Definition: prsht.h:117
#define PSN_HELP
Definition: prsht.h:119
#define PSN_RESET
Definition: prsht.h:118
#define PSN_SETACTIVE
Definition: prsht.h:115
#define err(...)
#define WM_NOTIFY
Definition: richedit.h:61
Definition: inflate.c:139
Definition: tftpd.h:60
#define SetWindowLongPtr
Definition: treelist.c:70
#define Button_Enable(hwndCtl, fEnable)
Definition: windowsx.h:30
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4399
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define BM_SETCHECK
Definition: winuser.h:1921
#define MB_OK
Definition: winuser.h:790
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define DWLP_MSGRESULT
Definition: winuser.h:870
#define MB_ICONINFORMATION
Definition: winuser.h:802
#define SW_SHOW
Definition: winuser.h:775
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SendDlgItemMessage
Definition: winuser.h:5851

Variable Documentation

◆ bIsOriginalBootIni

BOOL bIsOriginalBootIni = TRUE
static

Definition at line 20 of file generalpage.c.

Referenced by GeneralPageWndProc().

◆ hGeneralPage

HWND hGeneralPage = NULL
static

Definition at line 19 of file generalpage.c.

◆ lpszRestoreProgPath1

LPCWSTR lpszRestoreProgPath1 = L"%SystemRoot%\\System32\\rstrui.exe"
static

Definition at line 16 of file generalpage.c.

Referenced by GeneralPageWndProc().

◆ lpszRestoreProgPath2

LPCWSTR lpszRestoreProgPath2 = L"%SystemRoot%\\System32\\restore\\rstrui.exe"
static

Definition at line 17 of file generalpage.c.

Referenced by GeneralPageWndProc().