mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
regedit: Pass VK_DELETE messages to Listview/Treeview child windows.
This commit is contained in:
parent
bcc1fda727
commit
a4ed7a1003
@ -681,7 +681,9 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ID_EDIT_DELETE:
|
case ID_EDIT_DELETE:
|
||||||
if (GetFocus() == g_pChildWnd->hTreeWnd) {
|
{
|
||||||
|
HWND hWndDelete = GetFocus();
|
||||||
|
if (hWndDelete == g_pChildWnd->hTreeWnd) {
|
||||||
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
||||||
if (keyPath == 0 || *keyPath == 0) {
|
if (keyPath == 0 || *keyPath == 0) {
|
||||||
MessageBeep(MB_ICONHAND);
|
MessageBeep(MB_ICONHAND);
|
||||||
@ -689,7 +691,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
DeleteNode(g_pChildWnd->hTreeWnd, 0);
|
DeleteNode(g_pChildWnd->hTreeWnd, 0);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, keyPath);
|
HeapFree(GetProcessHeap(), 0, keyPath);
|
||||||
} else if (GetFocus() == g_pChildWnd->hListWnd) {
|
} else if (hWndDelete == g_pChildWnd->hListWnd) {
|
||||||
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
||||||
curIndex = ListView_GetNextItem(g_pChildWnd->hListWnd, -1, LVNI_SELECTED);
|
curIndex = ListView_GetNextItem(g_pChildWnd->hListWnd, -1, LVNI_SELECTED);
|
||||||
while(curIndex != -1) {
|
while(curIndex != -1) {
|
||||||
@ -713,8 +715,12 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, NULL);
|
RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, NULL);
|
||||||
HeapFree(GetProcessHeap(), 0, keyPath);
|
HeapFree(GetProcessHeap(), 0, keyPath);
|
||||||
}
|
} else if (IsChild(g_pChildWnd->hTreeWnd, hWndDelete) ||
|
||||||
|
IsChild(g_pChildWnd->hListWnd, hWndDelete)) {
|
||||||
|
SendMessage(hWndDelete, WM_KEYDOWN, VK_DELETE, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case ID_EDIT_MODIFY:
|
case ID_EDIT_MODIFY:
|
||||||
{
|
{
|
||||||
LPCWSTR valueName = GetValueName(g_pChildWnd->hListWnd);
|
LPCWSTR valueName = GetValueName(g_pChildWnd->hListWnd);
|
||||||
|
Loading…
Reference in New Issue
Block a user