[REGEDIT] Display search finished messagebox when using Find Next (F3) menu item...
[reactos.git] / base / applications / regedit / find.c
index f095712..1fb5bbe 100644 (file)
@@ -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);
     }
 }