LCL: Make MessageDlg default button work on Windows 7. Issue #19863, patch from Bart Broersma

git-svn-id: trunk@32035 -
This commit is contained in:
juha 2011-08-22 18:29:58 +00:00
parent 8c23048e7d
commit a21fbde6ef

View File

@ -731,7 +731,11 @@ begin
DialogButtons[i].pszButtonText := UTF8StringToPWideChar(GetButtonCaption(Buttons[i]));
end;
TaskConfig.pButtons := DialogButtons;
TaskConfig.nDefaultButton := DefaultIndex;
//we need idButtonXX value
if DefaultIndex < ButtonCount then
TaskConfig.nDefaultButton := Buttons[DefaultIndex]
else
TaskConfig.nDefaultButton := 0;
State := SaveApplicationState;
try