Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

enable/disable functionality

1 reply to this topic


  • Full Members
  • 31 posts

Posted 06 September 2011 - 12:52

I was trying to achieve the enable/disable functionality using the following code snippet:

#define CheckBox1 11
#define CheckBox2 12
#define Virtualization 12000 here Virtualization is the name of my dialog
#include "ifx.h"

export prototype EnableControls(HWND);

function EnableControls (hMSI)
HWND hwndDlg;
NUMBER nCmdValue, nResult;
STRING szDialogName;


szDialogName = "Virtualization";

nResult = EzDefineDialog (szDialogName, "", "" ,Virtualization);
if (nResult < 0) then

MessageBox ("Error in defining dialog", SEVERE);



nCmdValue = WaitOnDialog(szDialogName);
switch (nCmdValue)
case DLG_INIT:

hwndDlg = CmdGetHwndDlg (szDialogName);
_WinSubEnableControl(hwndDlg, CheckBox2, 1);


On virtualization dialog I have used the EnableControl function as DoAction for checkbox in which I want the other two checkboxes should enable. Also, condition set for checkbox is 1.

However, when I use the above code snippet I get the following error “Installshield cannot call DLL function: ISWindow” I tried to debug the code using the debugging feature in installshield and found that script is not able to recognize the dialog. Am I missing something?


  • Full Members
  • 90 posts

Posted 08 September 2011 - 08:17

You can also try Installscript's AskOptions() function that provides all the checkbox functionality without much trouble.