Clicking on mbClose button in a MessageDlg returns mrCancel instead of mrClose as result
Original Reporter info from Mantis: mmvisual
-
Reporter name: Markus Müller
Original Reporter info from Mantis: mmvisual
- Reporter name: Markus Müller
Description:
I have program this Message Box:
MessageDlg(Caption, 'buggy', mtInformation, [mbOK, mbClose], 0);
When I press the button mbClose, then the result must be mrClose but it is mrCancel.
I use this Version:
Lazarus-1.1-36568-fpc-2.6.0-20120405-win64.exe
Here the Demo-Code, take a Button and a Label1 in your Form:
procedure TForm1.Button2Click(Sender: TObject);
begin
Label1.Caption := IntToStr(MessageDlg(Caption, 'buggy', mtInformation, [mbOK, mbClose], 0));
end;
mrClose must = 11, mrCancel is 2.