Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMDMessageBoxDlg1 and defining a default button

CodeCompletion indicates the last integer variable in the LMDMessageBoxDlg1 code below should define the default button.  However, the default button is always the first button irrespective of the number entered into the parameter. Suggestions?

var
  tempCaption: String;
  tempMessage: String;
  tempReturnButton: Integer;
begin
            // OK returns 1 and Cancel returns 2
           tempReturnButton := LMDMessageBoxDlg1.Execute(tempCaption, tempMessage, [0], [TMsgDlgBtn.mbOK, TMsgDlgBtn.mbCancel], 1, -1, -1, -1, 2);
end;

TIA

John

Comments

Sign In or Register to comment.