From 2054f308861e2c4d676fb0439e35b7c804084649 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 19 Feb 2015 18:56:33 +0000 Subject: added delete button support git-svn-id: http://svn.miranda-ng.org/main/trunk@12198 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_options.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index db7e8bedbc..a8182f1727 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -360,6 +360,16 @@ LRESULT CALLBACK RowItemsSubProc(HWND hwndList, UINT msg, WPARAM wParam, LPARAM } } } + + if (msg == WM_KEYDOWN && wParam == VK_DELETE) + { + int sel = ListView_GetSelectionMark(hwndList); + if (MessageBox(hwndList, TranslateT("Are you sure?"), TranslateT("Node deleting"), MB_YESNO | MB_ICONWARNING) == IDYES) + { + ListView_DeleteItem(hwndList, sel); + SendMessage(GetParent(GetParent(hwndList)), PSM_CHANGED, 0, 0); + } + } return CallWindowProc(oldWndProc, hwndList, msg, wParam, lParam); } -- cgit v1.2.3