View Full Version : Populating a combobox at runtime with IS

10-17-2003, 09:52 AM
- InstallScript MSI project

I am trying to populate a combo box on a custom dialog at runtime. Here is the basic code I am using:


// Specify a name to identify the custom dialog in this setup.
szDialogName = "SdDatabaseLocation";

listInstances = ListCreate( STRINGLIST );
//populate the local instance of listInstances
listInstances = GetAllDatabaseInstances(listInstances);

// Define the dialog. Pass a null string in the second parameter
// to get the dialog from _isuser.dll or _isres.dll. Pass a null
// string in the third parameter because the dialog is identified
// by its ID in the fourth parameter.
//nResult = EzDefineDialog (szDialogName, "", "", RES_DIALOG_ID);
nResult = EzDefineDialog(szDialogName, ISUSER, "DatabaseLocation", 0);

Then in the Event case statement I have:

case DLG_INIT:
MessageBox("Loading Instance List",INFORMATION);
nResult = CtrlSetList(szDialogName, RES_CMBO_INSTANCE, listInstances);
MessageBox( svValue, INFORMATION);

The code compiles but at runtime the Combobox does not get populated, even though I can tell that there is 1 item in the LIST and the result from CtrlSetList is 0.

Any ideas?


10-17-2003, 10:13 AM
Think I found the problem. I had to reset the combobox height.