notepad: Add Cancel button to message box displayed when opening a non-existent file with the command line.

Alexander Scott-Johns alexander.scott.johns at googlemail.com
Tue Jul 7 18:35:03 CDT 2009


Fixes bug 19225.

* http://bugs.winehq.org/show_bug.cgi?id=19225

---
 programs/notepad/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
-------------- next part --------------
From bd5468071fd3dd9f176fb00734c2912461eddc54 Mon Sep 17 00:00:00 2001
From: Alexander Scott-Johns <alexander.scott.johns at googlemail.com>
Date: Tue, 7 Jul 2009 19:31:48 +0100
Subject: notepad: Add Cancel button to message box displayed when opening a
 non-existent file with the command line.

---
 programs/notepad/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index 104a834..b41d3bd 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -607,7 +607,7 @@ static int AlertFileDoesNotExist(LPCWSTR szFileName)
    LoadStringW(Globals.hInstance, STRING_ERROR, szResource, ARRAY_SIZE(szResource));
 
    nResult = MessageBoxW(Globals.hMainWnd, szMessage, szResource,
-                         MB_ICONEXCLAMATION | MB_YESNO);
+                         MB_ICONEXCLAMATION | MB_YESNOCANCEL);
 
    return(nResult);
 }
@@ -707,6 +707,10 @@ static void HandleCommandLine(LPWSTR cmdline)
 
             case IDNO:
                 break;
+            
+            case IDCANCEL:
+                DestroyWindow(Globals.hMainWnd);
+                break;
             }
         }
      }
-- 
1.5.6.3


More information about the wine-patches mailing list