Turn "Drop" confirmation dialogs into custom critical types, so we can set focus to the Cancel button. See http://www.heidisql.com/forum.php?t=14042

This commit is contained in:
Ansgar Becker
2013-11-20 20:52:35 +00:00
parent ef761a897f
commit e832f984f2
2 changed files with 5 additions and 2 deletions

View File

@ -327,6 +327,7 @@ var
AppSettings: TAppSettings;
MutexHandle: THandle = 0;
SystemImageList: TImageList;
mtCriticalConfirmation: TMsgDlgType = mtCustom;
implementation
@ -2324,6 +2325,8 @@ var
end;
Btn.Caption := cap;
Btn.ModalResult := BtnResult;
if (DlgType = mtCriticalConfirmation) and (BtnResult = mrCancel) then
Btn.Default := True;
end;
begin
if (Win32MajorVersion >= 6) and StyleServices.Enabled then begin