[3/3] wordpad: Search finished messagebox should be modal.

Dylan Smith dylan.ah.smith at gmail.com
Mon Jul 19 17:18:17 CDT 2010


Previously the user could keep searching after searching through all the
text with multiple messageboxes opening saying the search is finished. It
should be modal so that it must be closed before continuing to use the
find or main window, and should have the find dialog as an owner to stay
on top.
---
 programs/wordpad/wordpad.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c
index edee1f8..845b9ae 100644
--- a/programs/wordpad/wordpad.c
+++ b/programs/wordpad/wordpad.c
@@ -1288,8 +1288,10 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
 
         if (ret == -1) {
             custom_data->endPos = -1;
-            MessageBoxWithResStringW(hMainWnd, MAKEINTRESOURCEW(STRING_SEARCH_FINISHED),
-                                     wszAppTitle, MB_OK | MB_ICONASTERISK);
+            EnableWindow(hMainWnd, FALSE);
+            MessageBoxWithResStringW(hFindWnd, MAKEINTRESOURCEW(STRING_SEARCH_FINISHED),
+                                     wszAppTitle, MB_OK | MB_ICONASTERISK | MB_TASKMODAL);
+            EnableWindow(hMainWnd, TRUE);
         } else {
             SendMessageW(hEditorWnd, EM_SETSEL, ft.chrgText.cpMin, ft.chrgText.cpMax);
             SendMessageW(hEditorWnd, EM_SCROLLCARET, 0, 0);
-- 
1.7.0.4



More information about the wine-patches mailing list