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 Services -
3
* options dialog
4
*
5
* Copyright (C) 2011 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 <
phdk.h
>
24
#include <windowsx.h>
25
#include "
extsrv.h
"
26
#include "
resource.h
"
27
28
INT_PTR CALLBACK
OptionsDlgProc
(
29
_In_ HWND hwndDlg,
30
_In_ UINT uMsg,
31
_In_ WPARAM wParam,
32
_In_ LPARAM lParam
33
);
34
35
VOID
EsShowOptionsDialog
(
36
_In_ HWND ParentWindowHandle
37
)
38
{
39
DialogBox(
40
PluginInstance
->
DllBase
,
41
MAKEINTRESOURCE(
IDD_OPTIONS
),
42
ParentWindowHandle,
43
OptionsDlgProc
44
);
45
}
46
47
INT_PTR CALLBACK
OptionsDlgProc
(
48
_In_ HWND hwndDlg,
49
_In_ UINT uMsg,
50
_In_ WPARAM wParam,
51
_In_ LPARAM lParam
52
)
53
{
54
switch
(uMsg)
55
{
56
case
WM_INITDIALOG:
57
{
58
Button_SetCheck(GetDlgItem(hwndDlg,
IDC_ENABLESERVICESMENU
),
PhGetIntegerSetting
(
SETTING_NAME_ENABLE_SERVICES_MENU
) ? BST_CHECKED : BST_UNCHECKED);
59
}
60
break
;
61
case
WM_COMMAND:
62
{
63
switch
(LOWORD(wParam))
64
{
65
case
IDCANCEL:
66
EndDialog(hwndDlg, IDCANCEL);
67
break
;
68
case
IDOK:
69
{
70
PhSetIntegerSetting
(
SETTING_NAME_ENABLE_SERVICES_MENU
,
71
Button_GetCheck(GetDlgItem(hwndDlg,
IDC_ENABLESERVICESMENU
)) == BST_CHECKED);
72
73
EndDialog(hwndDlg, IDOK);
74
}
75
break
;
76
}
77
}
78
break
;
79
}
80
81
return
FALSE
;
82
}
plugins
ExtendedServices
options.c
Generated by
1.8.2