https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9de87871877451e6fe30a8c2e98015c9ead7b55a
commit 9de87871877451e6fe30a8c2e98015c9ead7b55a Author: Oleg Dubinskiy <oleg.dubinskij2...@yandex.ua> AuthorDate: Sat Nov 14 22:09:59 2020 +0200 Commit: Stanislav Motylkov <x86co...@gmail.com> CommitDate: Mon Dec 21 20:48:52 2020 +0300 [REGEDIT] Display search finished messagebox when using Find Next (F3) menu item (#3371) This repeats behaviour of Windows Regedit. CORE-17368 --- base/applications/regedit/find.c | 21 +++++++++++++-------- base/applications/regedit/framewnd.c | 2 +- base/applications/regedit/main.h | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/base/applications/regedit/find.c b/base/applications/regedit/find.c index f095712bc6c..1fb5bbe45a0 100644 --- a/base/applications/regedit/find.c +++ b/base/applications/regedit/find.c @@ -810,18 +810,23 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR return iResult; } +void FindNextMessageBox(HWND hWnd) +{ + if (!FindNext(hWnd)) + { + WCHAR msg[128], caption[128]; + + LoadStringW(hInst, IDS_FINISHEDFIND, msg, COUNT_OF(msg)); + LoadStringW(hInst, IDS_APP_TITLE, caption, COUNT_OF(caption)); + MessageBoxW(hWnd, msg, caption, MB_ICONINFORMATION); + } +} + void FindDialog(HWND hWnd) { if (DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_FIND), hWnd, FindDialogProc, 0) != 0) { - if (!FindNext(hWnd)) - { - WCHAR msg[128], caption[128]; - - LoadStringW(hInst, IDS_FINISHEDFIND, msg, COUNT_OF(msg)); - LoadStringW(hInst, IDS_APP_TITLE, caption, COUNT_OF(caption)); - MessageBoxW(hWnd, msg, caption, MB_ICONINFORMATION); - } + FindNextMessageBox(hWnd); } } diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c index 9fa92ec30e2..b9717cb4958 100644 --- a/base/applications/regedit/framewnd.c +++ b/base/applications/regedit/framewnd.c @@ -1230,7 +1230,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) FindDialog(hWnd); break; case ID_EDIT_FINDNEXT: - FindNext(hWnd); + FindNextMessageBox(hWnd); break; case ID_EDIT_COPYKEYNAME: CopyKeyName(hWnd, hKeyRoot, keyPath); diff --git a/base/applications/regedit/main.h b/base/applications/regedit/main.h index 01b7541434a..c9de998e3ee 100644 --- a/base/applications/regedit/main.h +++ b/base/applications/regedit/main.h @@ -103,6 +103,7 @@ extern int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMess /* find.c */ extern void FindDialog(HWND hWnd); extern BOOL FindNext(HWND hWnd); +extern void FindNextMessageBox(HWND hWnd); /* framewnd.c */ extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);