Inno setup官方文档:https://jrsoftware.org/ishelp/

进入官网切换到index,往下划就可以找到MsgBox,以及其他一些你想要的信息。下面摘抄了MsgBox的使用方法。

Inno setup MsgBox弹窗用法

Prototype:

function MsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons: Integer): Integer;

Description:

Displays a message box. Text specifies the message to display. Typ specifies which icon to display in the message box. Buttons specifies which buttons to include in the message box. Returns an ID* constant indicating the button the user clicked, or 0 if the function fails (which shouldn't happen unless an invalid parameter is specified or system resources are exhausted).

Remarks:

TMsgBoxType is defined as:

TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);

Supported flags for Buttons are:

MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_SETFOREGROUND

Possible return values are:

IDOK, IDCANCEL, IDABORT, IDRETRY, IDIGNORE, IDYES, IDNO

Example:

begin
  // Display a simple message box with an OK button
  MsgBox('Hello.', mbInformation, MB_OK);

  // Ask the user a Yes/No question
  if MsgBox('Are you sure?', mbConfirmation, MB_YESNO) = IDYES then
  begin
    // user clicked Yes
  end;

  // Ask the user a Yes/No question, defaulting to No
  if MsgBox('Are you sure?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
  begin
    // user clicked Yes
  end;
end;

See also:

SuppressibleMsgBox 
TaskDialogMsgBox

其中MsgBox('Are you sure?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)表示有两按钮,一个是,默认选择否

MsgBox('Are you sure?', mbConfirmation, MB_YESNO)表示有两按钮,一个是,默认选择是

MsgBox('Hello.', mbInformation, MB_OK)表示只有一个按钮

Inno setup MsgBox弹窗用法

Inno setup MsgBox弹窗用法

支持的按钮类型有

MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_SETFOREGROUND

相关文章:

  • 2021-12-02
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-08-21
  • 2021-06-28
  • 2022-12-23
相关资源
相似解决方案