Add cell copy menu to memory search results dialog
* memory search results
*
* Copyright (C) 2010-2016 wj32
- * Copyright (C) 2017-2019 dmex
+ * Copyright (C) 2017-2021 dmex
*
* This file is part of Process Hacker.
*
@@ -631,12 +631,12 @@ INT_PTR CALLBACK PhpMemoryResultsDlgProc(
POINT point;
PPH_EMENU menu;
PPH_EMENU_ITEM selectedItem;
- ULONG filterType = 0;
menu = PhCreateEMenu();
PhInsertEMenuItem(menu, PhCreateEMenuItem(0, ID_MEMORY_READWRITEMEMORY, L"Read/Write memory", NULL, NULL), ULONG_MAX);
PhInsertEMenuItem(menu, PhCreateEMenuSeparator(), ULONG_MAX);
PhInsertEMenuItem(menu, PhCreateEMenuItem(0, IDC_COPY, L"Copy", NULL, NULL), ULONG_MAX);
+ PhInsertCopyListViewEMenuItem(menu, IDC_COPY, lvHandle);
GetCursorPos(&point);
@@ -650,6 +650,8 @@ INT_PTR CALLBACK PhpMemoryResultsDlgProc(
);
if (selectedItem)
+ {
+ if (!PhHandleCopyListViewEMenuItem(selectedItem))
{
switch (selectedItem->Id)
{
@@ -700,11 +702,9 @@ INT_PTR CALLBACK PhpMemoryResultsDlgProc(
break;
case IDC_COPY:
{
- HWND lvHandle;
PPH_STRING string;
ULONG selectedCount;
- lvHandle = GetDlgItem(hwndDlg, IDC_LIST);
selectedCount = ListView_GetSelectedCount(lvHandle);
if (selectedCount == 0)
@@ -726,6 +726,7 @@ INT_PTR CALLBACK PhpMemoryResultsDlgProc(
break;
}
}
+ }
PhDestroyEMenu(menu);
}
