Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
wine
wine-winehq
Commits
f225297a
Commit
f225297a
authored
Mar 31, 2007
by
Byeong-Sik Jeon
Committed by
Alexandre Julliard
Apr 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Support REG_MULTI_SZ creation and editing.
parent
932c6f5b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
0 deletions
+75
-0
En.rc
programs/regedit/En.rc
+17
-0
edit.c
programs/regedit/edit.c
+53
-0
framewnd.c
programs/regedit/framewnd.c
+3
-0
resource.h
programs/regedit/resource.h
+2
-0
No files found.
programs/regedit/En.rc
View file @
f225297a
...
...
@@ -53,6 +53,7 @@ BEGIN
MENUITEM "&String Value", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binary Value", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Value", ID_EDIT_NEW_DWORDVALUE
MENUITEM "&Multi String Value", ID_EDIT_NEW_MULTI_STRINGVALUE
END
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
...
...
@@ -129,6 +130,7 @@ BEGIN
MENUITEM "&String Value", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binary Value", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Value", ID_EDIT_NEW_DWORDVALUE
MENUITEM "&Multi String Value", ID_EDIT_NEW_MULTI_STRINGVALUE
END
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
...
...
@@ -179,6 +181,7 @@ BEGIN
MENUITEM "&String Value", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binary Value", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Value", ID_EDIT_NEW_DWORDVALUE
MENUITEM "&Multi String Value", ID_EDIT_NEW_MULTI_STRINGVALUE
END
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
...
...
@@ -286,6 +289,19 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,175,80,30,11,WS_GROUP
END
IDD_EDIT_MULTI_STRING DIALOG DISCARDABLE 22, 17, 210, 175
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Edit Multi String"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Value name:",IDC_STATIC,5,5,119,8
EDITTEXT IDC_VALUE_NAME,5,15,200,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL| WS_DISABLED
LTEXT "Value data:",IDC_STATIC,5,30,119,8
EDITTEXT IDC_VALUE_DATA,5,40,200,112, WS_BORDER | WS_TABSTOP | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,140,160,30,11,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,175,160,30,11,WS_GROUP
END
/*
* String Table
*/
...
...
@@ -321,6 +337,7 @@ BEGIN
ID_EDIT_NEW_STRINGVALUE "Adds a new string value"
ID_EDIT_NEW_BINARYVALUE "Adds a new binary value"
ID_EDIT_NEW_DWORDVALUE "Adds a new double word value"
ID_EDIT_NEW_MULTI_STRINGVALUE "Adds a new multi string value"
ID_REGISTRY_IMPORTREGISTRYFILE "Imports a text file into the registry"
ID_REGISTRY_EXPORTREGISTRYFILE
"Exports all or part of the registry to a text file"
...
...
programs/regedit/edit.c
View file @
f225297a
...
...
@@ -322,6 +322,59 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName)
params
.
cbData
=
len
;
result
=
DialogBoxParam
(
NULL
,
MAKEINTRESOURCE
(
IDD_EDIT_BINARY
),
hwnd
,
bin_modify_dlgproc
,
(
LPARAM
)
&
params
);
}
else
if
(
type
==
REG_MULTI_SZ
)
{
TCHAR
char1
=
(
TCHAR
)
'\r'
,
char2
=
(
TCHAR
)
'\n'
;
TCHAR
*
tmpValueData
=
NULL
;
INT
i
,
j
,
count
;
for
(
i
=
0
,
count
=
0
;
i
<
len
-
1
;
i
++
)
if
(
!
stringValueData
[
i
]
&&
stringValueData
[
i
+
1
]
)
count
++
;
tmpValueData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
count
)
*
sizeof
(
TCHAR
));
if
(
!
tmpValueData
)
goto
done
;
for
(
i
=
0
,
j
=
0
;
i
<
len
-
1
;
i
++
)
{
if
(
!
stringValueData
[
i
]
&&
stringValueData
[
i
+
1
])
{
tmpValueData
[
j
++
]
=
char1
;
tmpValueData
[
j
++
]
=
char2
;
}
else
tmpValueData
[
j
++
]
=
stringValueData
[
i
];
}
tmpValueData
[
j
]
=
stringValueData
[
i
];
HeapFree
(
GetProcessHeap
(),
0
,
stringValueData
);
stringValueData
=
tmpValueData
;
tmpValueData
=
NULL
;
if
(
DialogBox
(
0
,
MAKEINTRESOURCE
(
IDD_EDIT_MULTI_STRING
),
hwnd
,
modify_dlgproc
)
==
IDOK
)
{
len
=
lstrlen
(
stringValueData
);
tmpValueData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
2
)
*
sizeof
(
TCHAR
));
if
(
!
tmpValueData
)
goto
done
;
for
(
i
=
0
,
j
=
0
;
i
<
len
-
1
;
i
++
)
{
if
(
stringValueData
[
i
]
==
char1
&&
stringValueData
[
i
+
1
]
==
char2
)
{
if
(
tmpValueData
[
j
-
1
]
!=
0
)
tmpValueData
[
j
++
]
=
0
;
i
++
;
}
else
tmpValueData
[
j
++
]
=
stringValueData
[
i
];
}
tmpValueData
[
j
++
]
=
stringValueData
[
i
];
tmpValueData
[
j
++
]
=
0
;
tmpValueData
[
j
++
]
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
stringValueData
);
stringValueData
=
tmpValueData
;
lRet
=
RegSetValueEx
(
hKey
,
valueName
,
0
,
type
,
(
LPBYTE
)
stringValueData
,
j
*
sizeof
(
TCHAR
));
if
(
lRet
==
ERROR_SUCCESS
)
result
=
TRUE
;
else
error_code_messagebox
(
hwnd
,
lRet
);
}
}
else
{
error
(
hwnd
,
IDS_UNSUPPORTED_TYPE
,
type
);
}
...
...
programs/regedit/framewnd.c
View file @
f225297a
...
...
@@ -710,6 +710,9 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case
ID_EDIT_NEW_STRINGVALUE
:
valueType
=
REG_SZ
;
goto
create_value
;
case
ID_EDIT_NEW_MULTI_STRINGVALUE
:
valueType
=
REG_MULTI_SZ
;
goto
create_value
;
case
ID_EDIT_NEW_BINARYVALUE
:
valueType
=
REG_BINARY
;
goto
create_value
;
...
...
programs/regedit/resource.h
View file @
f225297a
...
...
@@ -132,6 +132,7 @@
#define ID_SWITCH_PANELS 32871
#define ID_FAVORITE_FIRST 33000
#define ID_FAVORITE_LAST 33099
#define ID_EDIT_NEW_MULTI_STRINGVALUE 33100
#define IDD_EDIT_STRING 2000
#define IDC_VALUE_NAME 2001
...
...
@@ -142,6 +143,7 @@
#define IDC_FIND_VALUES 2006
#define IDC_FIND_CONTENT 2007
#define IDC_FIND_WHOLE 2008
#define IDD_EDIT_MULTI_STRING 2009
#define IDC_EXPORT_BASE 100
#define IDC_EXPORT_ALL 101
...
...
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