mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Add a couple of other sensible button defaults in MessageBox()s.
[originally from svn r5305]
This commit is contained in:
parent
e8a4e7e601
commit
0fb46d3a0a
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user