Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
d1bc3623
Commit
d1bc3623
authored
Jul 25, 2022
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Set the dlgproc value name via a function, not a global.
parent
5e2c3dd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
edit.c
programs/regedit/edit.c
+11
-9
No files found.
programs/regedit/edit.c
View file @
d1bc3623
...
...
@@ -29,7 +29,6 @@
#include "main.h"
static
const
WCHAR
*
editValueName
;
static
BOOL
isDecimal
;
struct
edit_params
...
...
@@ -150,6 +149,14 @@ static BOOL update_registry_value(HWND hwndDlg, struct edit_params *params)
return
!
ret
;
}
static
void
set_dlgproc_value_name
(
HWND
hwndDlg
,
struct
edit_params
*
params
)
{
if
(
params
->
value_name
)
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
params
->
value_name
);
else
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
g_pszDefaultValueName
);
}
static
INT_PTR
CALLBACK
modify_string_dlgproc
(
HWND
hwndDlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
struct
edit_params
*
params
;
...
...
@@ -160,7 +167,7 @@ static INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpa
case
WM_INITDIALOG
:
params
=
(
struct
edit_params
*
)
lparam
;
SetWindowLongPtrW
(
hwndDlg
,
DWLP_USER
,
(
ULONG_PTR
)
params
);
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
editValueName
);
set_dlgproc_value_name
(
hwndDlg
,
params
);
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_DATA
,
params
->
data
);
return
TRUE
;
case
WM_COMMAND
:
...
...
@@ -200,7 +207,7 @@ static INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpar
case
WM_INITDIALOG
:
params
=
(
struct
edit_params
*
)
lparam
;
SetWindowLongPtrW
(
hwndDlg
,
DWLP_USER
,
(
ULONG_PTR
)
params
);
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
editValueName
);
set_dlgproc_value_name
(
hwndDlg
,
params
);
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_DATA
,
params
->
data
);
CheckRadioButton
(
hwndDlg
,
IDC_DWORD_HEX
,
IDC_DWORD_DEC
,
IDC_DWORD_HEX
);
isDecimal
=
FALSE
;
...
...
@@ -237,10 +244,7 @@ static INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wP
case
WM_INITDIALOG
:
params
=
(
struct
edit_params
*
)
lParam
;
SetWindowLongPtrW
(
hwndDlg
,
DWLP_USER
,
(
ULONG_PTR
)
params
);
if
(
params
->
value_name
)
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
params
->
value_name
);
else
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
g_pszDefaultValueName
);
set_dlgproc_value_name
(
hwndDlg
,
params
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_SETDATA
,
(
WPARAM
)
params
->
size
,
(
LPARAM
)
params
->
data
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
WM_SETFONT
,
(
WPARAM
)
GetStockObject
(
ANSI_FIXED_FONT
),
TRUE
);
return
TRUE
;
...
...
@@ -380,8 +384,6 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
struct
edit_params
params
;
BOOL
result
=
FALSE
;
editValueName
=
valueName
?
valueName
:
g_pszDefaultValueName
;
if
(
RegOpenKeyExW
(
hKeyRoot
,
keyPath
,
0
,
KEY_READ
|
KEY_SET_VALUE
,
&
params
.
hkey
))
{
error_code_messagebox
(
hwnd
,
IDS_SET_VALUE_FAILED
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment