//=========================================================================== // // File Name: Setup.rul // // Description: Blank setup main script file // // Comments: Blank setup is an empty setup project. If you want to // create a new project via. step-by step instructions use the // Project Assistant. // //=========================================================================== // Included header files ---------------------------------------------------- #include "ifx.h" // Note: In order to have your InstallScript function executed as a custom // action by the Windows Installer, it must be prototyped as an // entry-point function. // The keyword export identifies MyFunction() as an entry-point function. // The argument it accepts must be a handle to the Installer database. /* export prototype ExFn_CtrlGetText( ); */ // Dialog box and control IDs. #define RES_DIALOG_ID 12010 // ID of custom dialog box #define RES_PBUT_NEXT 1 // ID of Next button #define RES_PBUT_CANCEL 9 // ID of Cancel button #define RES_PBUT_BACK 12 // ID of Back button #define RES_EDITNAME 1201 // ID of edit box #define RES_EDITCOMPANY 1202 // ID of edit box // Include Ifx.h for built-in InstallScript function prototypes. #include "Ifx.h" export prototype ExFn_CtrlGetText( ); function ExFn_CtrlGetText( ) STRING szDialogName, szDLLName, szDialog; NUMBER nDialog, nResult, nCmdValue; BOOL bDone; HWND hInstance, hwndParent; begin MessageBox ("TEST",INFORMATION); // Define the name of a dialog box to pass as first // parameter to DefineDialog. szDialogName = "ExampleDialog"; // DefineDialog's second parameter will be 0 because the // dll is in _isres.dll. hInstance = 0; // DefineDialog's third parameter will be null; installation // will search for the dialog box in _isuser.dll and _isres.dll. szDLLName = ""; // DefineDialog's fifth parameter will be null because the // dialog box is identified by its ID in the fourth parameter. szDialog = "Dialog1"; // This value is reserved and must be 0. hwndParent = 0; // Define the dialog box. The installation's main window will own // the dialog box (indicated by HWND_INSTALL in parameter 7). nResult = DefineDialog (szDialogName, hInstance, szDLLName, RES_DIALOG_ID, szDialog, hwndParent, HWND_INSTALL, DLG_MSG_STANDARD|DLG_CENTERED); // Check for an error. if (nResult < 0) then MessageBox ("An error occurred while defining the dialog box.", SEVERE); bDone = TRUE; abort; endif; // Initialize the indicator used to control the while loop. bDone = FALSE; // Loop until done. repeat // Display the dialog box and return the next dialog box event. nCmdValue = WaitOnDialog(szDialogName); // Respond to the event. switch (nCmdValue) case DLG_CLOSE: // The user clicked the window's Close button. Do (EXIT); case DLG_ERR: MessageBox ("Unable to display dialog box. Setup canceled.", SEVERE); abort; case DLG_INIT: ; // No initialization is required for this example. case RES_PBUT_CANCEL: // The user clicked the Cancel button. Do (EXIT); case RES_PBUT_NEXT: bDone = TRUE; case RES_PBUT_BACK: bDone = TRUE; endswitch; until bDone; // Close the dialog box. EndDialog (szDialogName); // Free the dialog box from memory. ReleaseDialog (szDialogName); end;