Second, after the validity of the control on the input control dialog After customizing a dialog, it may be necessary to control the relationship between the controls on the dialog box, such as after the selected radio box, make some controls Effective, and after selecting other radio boxes, other controls are valid, etc. To implement these features, you need to manually write the installshield script to be implemented. Below is a custom dialog that adds a custom dialog in the installation wizard, which is implemented on this machine to add a SQL Server data source on this machine when installing. Figure "Custom Dialog Effect Diagram" is the running renderings of the custom dialog:
In this custom dialog, additional accessories are completed in addition to the data sources to configure SQL Server. In order to configure a SQL Server data source on this machine, you need to enter the name of the data source. The data source is a user data source or system data source, and the database and server users and passwords. It is required to complete the auxiliary function. Only when you enter the necessary data (such as server, database, user name, data source, etc.), the button "Next" can be valid. In order to achieve this requirement, it is necessary to judge the user's input, which can be used in InstallShield. Waitondialog is getting events from the current dialog. Below is a complete script code that completes this feature:
///// kdcis.rul //////
#ifndef __kdcis_rul_ # define __kdcis_rul_
#include "winsysdll.h" // // pre-defined script dialog constants //
// ----- Attribute Dialog Controls ------ # Define DLG_DSN_SQLSERVER 30001
#define IDC_RADIO_DSN_USER 1001 # define IDC_RADIO_DSN_SYSTEM 1002 # define IDC_EDIT_DB_ADDR 1003 # define IDC_EDIT_SQLSERVER_USER_NAME 1004 # define IDC_EDIT_SQLSERVER_USER_PWD 1005 # define IDC_EDIT_SQLSERVER_DSN 1006 # define IDC_EDIT_SQLSERVER_DB 1007
File: // --------------------- // Function Prototypes file: // ---------------- --------
//// Display Configure SQLServer Data Source Dialog // Parameters: // Bool BFIRSTEP: Is it the first step in installation? // Bool BallownotSet: Whether to skip this setting // byval string sztitle: dialog /// Prototype BuildsqlSerDSN (Bool, Bool, ByVal String);