-4

How to make a message box on the Cancel button?

https://4sysops.com/wp-content/uploads/2015/09/Yes-No-prompt.png

1 Answers1

1

Implement the CancelButtonClick event function.

[Code]

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  MsgBox('Cancel button was clicked', mbInformation, MB_OK);
end;

Set the Cancel and Confirm out parameters to make Inno Setup proceed as you need.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • And can we know that? Ask a good question to get what you want. – Martin Prikryl Aug 01 '16 at 10:53
  • See also [Inno Setup MsgBox with three buttons and three outcomes](http://stackoverflow.com/q/25515610/850848). – Martin Prikryl Aug 01 '16 at 10:54
  • So edit your question to make it clear. – Martin Prikryl Aug 01 '16 at 11:32
  • 1
    @Zasanialhodda: Martin has answered the specific question you asked, and given you a good working example of displaying a messagebox when the cancel button is clicked. You should be able to read the documentation for the MsgBox function to figure out how to make it display specific icons and buttons. – Ken White Aug 01 '16 at 12:56
  • What do we do with that? – Martin Prikryl Aug 01 '16 at 13:27
  • Here on Stack Overflow, you have to be able to describe the problem clearly, in the question text (not in the comments), to make it indexable and searchable, so others with the same problem can find the answer too. + You obviously need some behavior too. So far you have only described us some message box. But not what it should do. – Martin Prikryl Aug 01 '16 at 13:34
  • What is not clear ? – Zasanialhodda Aug 01 '16 at 13:52