From 0c82108a484b1df670b09714c33f10bd29d9c011 Mon Sep 17 00:00:00 2001 From: Alexander Scott-Johns Date: Tue, 7 Jul 2009 19:31:48 +0100 Subject: [PATCH] notepad: Add Cancel button to message box displayed when opening a non-existent file with the command line. --- programs/notepad/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 104a83499ad..d45fac7f098 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; } } }