ReactOS
0.4.16-dev-197-g92996da
generalpage.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Applications
3
* LICENSE: LGPL - See COPYING in the top level directory
4
* FILE: base/applications/msconfig/generalpage.c
5
* PURPOSE: General page message handler
6
* COPYRIGHT: Copyright 2005-2006 Christoph von Wittich <Christoph@ApiViewer.de>
7
*
8
*/
9
10
#include "
precomp.h
"
11
12
HWND
hGeneralPage
;
13
HWND
hGeneralDialog
;
14
15
VOID
16
EnableCheckboxControls
(
HWND
hDlg,
BOOL
bEnable
)
17
{
18
EnableWindow
(
GetDlgItem
(hDlg,
IDC_CBX_SYSTEM_INI
),
bEnable
);
19
EnableWindow
(
GetDlgItem
(hDlg,
IDC_CBX_SYSTEM_SERVICE
),
bEnable
);
20
EnableWindow
(
GetDlgItem
(hDlg,
IDC_CBX_STARTUP_ITEM
),
bEnable
);
21
}
22
23
24
INT_PTR
CALLBACK
25
GeneralPageWndProc
(
HWND
hDlg,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
26
{
27
UNREFERENCED_PARAMETER
(
lParam
);
28
29
switch
(
message
)
30
{
31
case
WM_INITDIALOG
:
32
hGeneralDialog
= hDlg;
33
SetWindowPos
(hDlg,
NULL
, 10, 32, 0, 0,
SWP_NOACTIVATE
|
SWP_NOOWNERZORDER
|
SWP_NOSIZE
|
SWP_NOZORDER
);
34
/* FIXME */
35
SendDlgItemMessage
(hDlg,
IDC_CBX_NORMAL_START
,
BM_SETCHECK
,
BST_CHECKED
, 0);
36
EnableCheckboxControls
(hDlg,
FALSE
);
37
return
TRUE
;
38
case
WM_COMMAND
:
39
switch
(
LOWORD
(
wParam
))
40
{
41
case
IDC_CBX_NORMAL_START
:
42
case
IDC_CBX_DIAGNOSTIC_START
:
43
EnableCheckboxControls
(hDlg,
FALSE
);
44
break
;
45
case
IDC_CBX_SELECTIVE_STARTUP
:
46
EnableCheckboxControls
(hDlg,
TRUE
);
47
break
;
48
default
:
49
break
;
50
}
51
}
52
return
0;
53
}
IDC_CBX_NORMAL_START
#define IDC_CBX_NORMAL_START
Definition:
resource.h:24
IDC_CBX_SYSTEM_INI
#define IDC_CBX_SYSTEM_INI
Definition:
resource.h:27
IDC_CBX_SYSTEM_SERVICE
#define IDC_CBX_SYSTEM_SERVICE
Definition:
resource.h:28
IDC_CBX_STARTUP_ITEM
#define IDC_CBX_STARTUP_ITEM
Definition:
resource.h:29
IDC_CBX_DIAGNOSTIC_START
#define IDC_CBX_DIAGNOSTIC_START
Definition:
resource.h:25
IDC_CBX_SELECTIVE_STARTUP
#define IDC_CBX_SELECTIVE_STARTUP
Definition:
resource.h:26
wParam
WPARAM wParam
Definition:
combotst.c:138
lParam
LPARAM lParam
Definition:
combotst.c:139
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
CALLBACK
#define CALLBACK
Definition:
compat.h:35
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
void
Definition:
nsiface.idl:2307
EnableCheckboxControls
VOID EnableCheckboxControls(HWND hDlg, BOOL bEnable)
Definition:
generalpage.c:16
hGeneralPage
HWND hGeneralPage
Definition:
generalpage.c:12
GeneralPageWndProc
INT_PTR CALLBACK GeneralPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition:
generalpage.c:25
hGeneralDialog
HWND hGeneralDialog
Definition:
generalpage.c:13
UINT
unsigned int UINT
Definition:
ndis.h:50
UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(P)
Definition:
ntbasedef.h:317
LOWORD
#define LOWORD(l)
Definition:
pedump.c:82
message
Definition:
tftpd.h:60
INT_PTR
int32_t INT_PTR
Definition:
typedefs.h:64
precomp.h
bEnable
_In_ BOOL bEnable
Definition:
winddi.h:3426
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
WPARAM
UINT_PTR WPARAM
Definition:
windef.h:207
SWP_NOACTIVATE
#define SWP_NOACTIVATE
Definition:
winuser.h:1245
SetWindowPos
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
WM_COMMAND
#define WM_COMMAND
Definition:
winuser.h:1743
SWP_NOSIZE
#define SWP_NOSIZE
Definition:
winuser.h:1248
WM_INITDIALOG
#define WM_INITDIALOG
Definition:
winuser.h:1742
GetDlgItem
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BM_SETCHECK
#define BM_SETCHECK
Definition:
winuser.h:1924
EnableWindow
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
SWP_NOOWNERZORDER
#define SWP_NOOWNERZORDER
Definition:
winuser.h:1252
SWP_NOZORDER
#define SWP_NOZORDER
Definition:
winuser.h:1250
SendDlgItemMessage
#define SendDlgItemMessage
Definition:
winuser.h:5854
BST_CHECKED
#define BST_CHECKED
Definition:
winuser.h:197
base
applications
msconfig
generalpage.c
Generated on Wed Oct 30 2024 06:02:17 for ReactOS by
1.9.6