EzDefineDialog
The EzDefineDialog function defines a custom dialog.
Note:This function does not display the custom dialog. To display a custom dialog, call WaitOnDialog.
Syntax
EzDefineDialog ( szDialogName, szDLLName, szDialogID, nDialogID );
Parameters
Parameter |
Description |
szDialogName |
Specifies the name to associate with the dialog identified by szDialogID or nDialogID. To process this dialog, use this name in subsequent calls to custom dialog functions. Note that the dialog's name is case-sensitive; you must use it exactly as you have specified it in this parameter. |
szDLLName |
Specifies the name of the .dll file that contains the dialog resource. If this name is not qualified (that is, if you do not specify the drive and path with the file name), the InstallScript engine searches for the .dll file in the Windows folder. If it is not found there, the InstallScript engine searches the folders that are specified in the search path. When the dialog is located in _isuser.dll, you can specify a null string ("") in this parameter; the InstallScript engine automatically checks _isuser.dll if this parameter is specified as a null string (""). Note:When you use a .dll file other than _isres.dll or _isuser.dll, you must call UseDLL to load the .dll file before calling EzDefineDialog. To unload the .dll file from memory, call UnUseDLL after calling ReleaseDialog. |
szDialogID |
Specifies the dialog’s resource ID if you use a string rather than a number to identify the resource. If this parameter is a null string (""), nDialogID is used to identify the dialog resources. It is recommended that you use nDialogID rather than szDialogID to identify the dialog resource. Note:If you created the dialog in the Dialogs view, the dialog is created with a string ID; therefore, you must specify this name as the szDialogID parameter to define the dialog. If you override an existing dialog in the Dialogs view, the dialog has a numeric ID, and you must specify the ID in the nDialogID parameter. If you want to use numeric IDs in all cases—which is what is recommended—you must edit the dialog in the Dialogs view to change the ISResourceID property of the created dialog to the desired Dialog ID instead of 0. Note that if you do this, the dialog name is no longer used when the dialog is created; it is used only in the Dialogs view in InstallShield to identify the dialog. The dialog is built with the correct numeric ID. |
nDialogID |
Specifies the dialog’s resource ID if you use a number rather than a string to identify the resource. This parameter is used only when szDialogID is a null string (""). It is recommended that you use nDialogID rather than szDialogID to identify the dialog resource. |
Return Values
Return Value |
Description |
0 |
EzDefineDialog successfully defined the dialog. |
DLG_ERR_ALREADY_EXISTS (-3) |
Indicates that you are trying to define a dialog that has already been defined in the installation script. You cannot define two dialogs with the same name. |
DLG_ERR (-1) |
Indicates an unspecified error condition. |