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

Alexandre Julliard julliard at winehq.org
Wed Jul 8 14:35:54 CDT 2009


Module: wine
Branch: master
Commit: 0c82108a484b1df670b09714c33f10bd29d9c011
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0c82108a484b1df670b09714c33f10bd29d9c011

Author: Alexander Scott-Johns <alexander.scott.johns at googlemail.com>
Date:   Tue Jul  7 19:31:48 2009 +0100

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..d45fac7 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;
             }
         }
      }




More information about the wine-cvs mailing list