From: jacob Date: Tue, 15 Feb 2005 19:22:47 +0000 (+0000) Subject: Add a couple of other sensible button defaults in MessageBox()s. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/76347f46fb70138ad34af07b2ab00625600931f1 Add a couple of other sensible button defaults in MessageBox()s. git-svn-id: svn://svn.tartarus.org/sgt/putty@5305 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/windows/windlg.c b/windows/windlg.c index 8dd9d290..04470cd6 100644 --- a/windows/windlg.c +++ b/windows/windlg.c @@ -793,7 +793,7 @@ void askalg(void *frontend, const char *algtype, const char *algname) message = dupprintf(msg, algtype, algname); title = dupprintf(mbtitle, appname); mbret = MessageBox(NULL, message, title, - MB_ICONWARNING | MB_YESNO); + MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2); sfree(message); sfree(title); if (mbret == IDYES) @@ -823,7 +823,7 @@ int askappend(void *frontend, Filename filename) mbtitle = dupprintf("%s Log to File", appname); mbret = MessageBox(NULL, message, mbtitle, - MB_ICONQUESTION | MB_YESNOCANCEL); + MB_ICONQUESTION | MB_YESNOCANCEL | MB_DEFBUTTON3); sfree(message); sfree(mbtitle); diff --git a/windows/window.c b/windows/window.c index 1f4220e4..80467745 100644 --- a/windows/window.c +++ b/windows/window.c @@ -1862,7 +1862,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, if (!cfg.warn_on_close || session_closed || MessageBox(hwnd, "Are you sure you want to close this session?", - str, MB_ICONWARNING | MB_OKCANCEL) == IDOK) + str, MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2) + == IDOK) DestroyWindow(hwnd); sfree(str); }