Customising and extending SdDialogs in IS 6 and upwards without access to the original source code.InstallDialogue implements the technology of event handlers for dialogs. This makes it very easy for you to make customisations to the built-in dialogs of InstallShield, without loosing any of the normal functionality of the dialog. All you have to do is write some script functions.
E.g. You want to move the SetupType() dialog to the left hand side of the screen.
Declare the function that will be called on the initialisation of the dialog (DLG_INIT)
prototype export DlgInitSetupType(HWND);function DlgInitSetupType(hwnd)
int x, y, cx, cy;
begin
// use an ID function for retrieving
// current position and size of the dialog
IdGetDlgPosT(hwnd, x, y, cx, cy):
// move the dialog to the left
// starting at pixel 2
IdSetDlgPosT(hwnd, 2, y, cx, cy);
endTell the InstallDialogue engine that this function should be used for the SetupType dialog. This is accomplished by calling the function IdSetInitDialogCallBack before the call to the SetupType function. Like this:
szDialogName = "DlgInitSetupType";
IdSetInitDialogCallBack(szDialogName);
nResult = SetupType ( szTitle , szMsg , "" , nSetupType , 0 );That is all you have to do to move a dialog.
You can also declare event handlers for other events in the dialog. Eg. when an edit box content has changed or when a button is pressed. This can be for the controls made by InstallShield or it can be a control that you create in the InitDialog handler.
When you download the software you get some sample files that shows different uses of the callback mechanism.
- E.g a license dialog with a "Print" button added, and which forces the user to scroll the license text to the end before the Yes button is enabled.
- A Maintenance dialog where the text of the repair button is changed to "Upgrade".
- A SdRegisterUserEx with a serial number check.
- A SdComponentTree with two buttons for selecting/deselecting all components.