From fc470152e1d188c2bc18f52a9a0716005494f464 Mon Sep 17 00:00:00 2001 From: Udo Hoffmann Date: Thu, 1 Oct 2020 18:39:57 +0200 Subject: [PATCH] Remove TreeView Beep when pressing return key Fix #8938, close #8940 --- PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp | 3 +++ .../src/WinControls/FunctionList/functionListPanel.cpp | 4 ++++ PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp index 9912e6bcd..1907c8431 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp @@ -633,6 +633,9 @@ void FileBrowser::notified(LPNMHDR notification) } break; + case NM_RETURN: + SetWindowLongPtr(_hSelf, DWLP_MSGRESULT, 1); + break; case TVN_KEYDOWN: { diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index f5033923a..63a748da3 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -561,6 +561,10 @@ void FunctionListPanel::notified(LPNMHDR notification) } break; + case NM_RETURN: + SetWindowLongPtr(_hSelf, DWLP_MSGRESULT, 1); + break; + case TVN_KEYDOWN: { LPNMTVKEYDOWN ptvkd = (LPNMTVKEYDOWN)notification; diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index 70d2dacdd..5d28a449c 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -628,6 +628,10 @@ void ProjectPanel::notified(LPNMHDR notification) openSelectFile(); } break; + + case NM_RETURN: + SetWindowLongPtr(_hSelf, DWLP_MSGRESULT, 1); + break; case TVN_ENDLABELEDIT: {