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
f3c4cca7
Commit
f3c4cca7
authored
May 29, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Add listview entries without refreshing the listview.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ebfe566c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
edit.c
programs/regedit/edit.c
+9
-1
framewnd.c
programs/regedit/framewnd.c
+1
-3
listview.c
programs/regedit/listview.c
+2
-1
main.h
programs/regedit/main.h
+1
-0
No files found.
programs/regedit/edit.c
View file @
f3c4cca7
...
...
@@ -443,8 +443,9 @@ BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPW
WCHAR
newValue
[
256
];
DWORD
valueDword
=
0
;
BOOL
result
=
FALSE
;
int
valueNum
;
int
valueNum
,
index
;
HKEY
hKey
;
LVITEMW
item
;
lRet
=
RegOpenKeyExW
(
hKeyRoot
,
keyPath
,
0
,
KEY_READ
|
KEY_SET_VALUE
,
&
hKey
);
if
(
lRet
!=
ERROR_SUCCESS
)
{
...
...
@@ -470,6 +471,13 @@ BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPW
error_code_messagebox
(
hwnd
,
IDS_CREATE_VALUE_FAILED
);
goto
done
;
}
/* Add the new item to the listview */
index
=
AddEntryToList
(
g_pChildWnd
->
hListWnd
,
valueName
,
valueType
,
(
BYTE
*
)
&
valueDword
,
sizeof
(
DWORD
));
item
.
state
=
LVIS_FOCUSED
|
LVIS_SELECTED
;
item
.
stateMask
=
LVIS_FOCUSED
|
LVIS_SELECTED
;
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_SETITEMSTATE
,
index
,
(
LPARAM
)
&
item
);
result
=
TRUE
;
done:
...
...
programs/regedit/framewnd.c
View file @
f3c4cca7
...
...
@@ -861,10 +861,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
WCHAR
*
keyPath
=
GetItemPath
(
g_pChildWnd
->
hTreeWnd
,
0
,
&
hKeyRoot
);
WCHAR
newKey
[
MAX_NEW_KEY_LEN
];
if
(
CreateValue
(
hWnd
,
hKeyRoot
,
keyPath
,
valueType
,
newKey
))
{
RefreshListView
(
g_pChildWnd
->
hListWnd
,
hKeyRoot
,
keyPath
,
newKey
);
if
(
CreateValue
(
hWnd
,
hKeyRoot
,
keyPath
,
valueType
,
newKey
))
StartValueRename
(
g_pChildWnd
->
hListWnd
);
}
HeapFree
(
GetProcessHeap
(),
0
,
keyPath
);
}
break
;
...
...
programs/regedit/listview.c
View file @
f3c4cca7
...
...
@@ -109,7 +109,7 @@ static void MakeMULTISZDisplayable(LPWSTR multi)
/*******************************************************************************
* Local module support methods
*/
static
void
AddEntryToList
(
HWND
hwndLV
,
LPWSTR
Name
,
DWORD
dwValType
,
void
*
ValBuf
,
DWORD
dwCount
)
int
AddEntryToList
(
HWND
hwndLV
,
WCHAR
*
Name
,
DWORD
dwValType
,
void
*
ValBuf
,
DWORD
dwCount
)
{
LINE_INFO
*
linfo
;
LVITEMW
item
;
...
...
@@ -202,6 +202,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType, void *ValB
}
}
}
return
index
;
}
static
BOOL
InitListViewImageList
(
HWND
hWndListView
)
...
...
programs/regedit/main.h
View file @
f3c4cca7
...
...
@@ -117,6 +117,7 @@ extern void SetupStatusBar(HWND hWnd, BOOL bResize);
extern
void
UpdateStatusBar
(
void
);
/* listview.c */
extern
int
AddEntryToList
(
HWND
hwndLV
,
WCHAR
*
Name
,
DWORD
dwValType
,
void
*
ValBuf
,
DWORD
dwCount
);
extern
HWND
CreateListView
(
HWND
hwndParent
,
UINT
id
);
extern
BOOL
RefreshListView
(
HWND
hwndLV
,
HKEY
hKeyRoot
,
LPCWSTR
keyPath
,
LPCWSTR
highlightValue
);
extern
HWND
StartValueRename
(
HWND
hwndLV
);
...
...
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