Process Hacker
Main Page
Namespaces
Data Structures
Files
File List
Globals
options.c
Go to the documentation of this file.
1
/*
2
* Process Hacker Extended Tools -
3
* options dialog
4
*
5
* Copyright (C) 2010 wj32
6
*
7
* This file is part of Process Hacker.
8
*
9
* Process Hacker is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
13
*
14
* Process Hacker is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with Process Hacker. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#include "
exttools.h
"
24
#include "
resource.h
"
25
#include <windowsx.h>
26
27
INT_PTR CALLBACK
OptionsDlgProc
(
28
_In_ HWND hwndDlg,
29
_In_ UINT uMsg,
30
_In_ WPARAM wParam,
31
_In_ LPARAM lParam
32
);
33
34
VOID
EtShowOptionsDialog
(
35
_In_ HWND ParentWindowHandle
36
)
37
{
38
DialogBox(
39
PluginInstance
->
DllBase
,
40
MAKEINTRESOURCE(
IDD_OPTIONS
),
41
ParentWindowHandle,
42
OptionsDlgProc
43
);
44
}
45
46
INT_PTR CALLBACK
OptionsDlgProc
(
47
_In_ HWND hwndDlg,
48
_In_ UINT uMsg,
49
_In_ WPARAM wParam,
50
_In_ LPARAM lParam
51
)
52
{
53
switch
(uMsg)
54
{
55
case
WM_INITDIALOG:
56
{
57
Button_SetCheck(GetDlgItem(hwndDlg,
IDC_ENABLEETWMONITOR
),
PhGetIntegerSetting
(
SETTING_NAME_ENABLE_ETW_MONITOR
) ? BST_CHECKED : BST_UNCHECKED);
58
Button_SetCheck(GetDlgItem(hwndDlg,
IDC_ENABLEGPUMONITOR
),
PhGetIntegerSetting
(
SETTING_NAME_ENABLE_GPU_MONITOR
) ? BST_CHECKED : BST_UNCHECKED);
59
60
if
(
WindowsVersion
<
WINDOWS_7
)
61
EnableWindow(GetDlgItem(hwndDlg,
IDC_ENABLEGPUMONITOR
),
FALSE
);
62
}
63
break
;
64
case
WM_COMMAND:
65
{
66
switch
(LOWORD(wParam))
67
{
68
case
IDCANCEL:
69
EndDialog(hwndDlg, IDCANCEL);
70
break
;
71
case
IDOK:
72
{
73
PhSetIntegerSetting
(
SETTING_NAME_ENABLE_ETW_MONITOR
,
74
Button_GetCheck(GetDlgItem(hwndDlg,
IDC_ENABLEETWMONITOR
)) == BST_CHECKED);
75
PhSetIntegerSetting
(
SETTING_NAME_ENABLE_GPU_MONITOR
,
76
Button_GetCheck(GetDlgItem(hwndDlg,
IDC_ENABLEGPUMONITOR
)) == BST_CHECKED);
77
78
EndDialog(hwndDlg, IDOK);
79
}
80
break
;
81
}
82
}
83
break
;
84
}
85
86
return
FALSE
;
87
}
plugins
ExtendedTools
options.c
Generated by
1.8.2