EndDialog

InstallShield 2015 » InstallScript Language Reference

The EndDialog function closes a custom dialog. It removes the dialog and initiates the dialog closing process. Use EndDialog when any of the following conditions exist:

• The Next button or its equivalent has been processed.
• The Cancel button or its equivalent has been processed.
• The Close system menu option has been selected. This action sends the DLG_CLOSE message.
• Any other situation in which the user ends the dialog operation.

After calling EndDialog to end a custom dialog, call the ReleaseDialog function to free the memory associated with the custom dialog.

Note: You can call WaitOnDialog to redisplay a custom dialog that was closed by a call to EndDialog provided that you have not called ReleaseDialog to remove the dialog from memory. If you call WaitOnDialog to open a dialog that has been opened and closed previously in your script, you must call CmdGetHwndDlg again to get the new handle. The old handle is no longer valid.

Syntax

EndDialog ( szDialogName );

Parameters

EndDialog Parameters

Parameter

Description

szDialogName

Specifies the name of the dialog to close.

Return Values

EndDialog Return Values

Return Value

Description

0

EndDialog successfully closed the dialog.

< 0

EndDialog was unable to close the dialog.

See Also