PDA

View Full Version : Capturing Events on the click Event of a Dialog Box Control



bala_at_web
06-23-2005, 05:42 AM
Hi All,
Can somebody tell me how to capture the checkbox click event of a check box in my install script I had made a custom Dialog box that has a check box and What I want to do is that when the user clicks on the check box I want to disable another control.

can some one suggest me how to do that!
Thanks in advance

Regards
Balaram Barange

Yorkie
06-23-2005, 06:42 AM
Assuming your using EzDefineDialog() and WaitOnDialog() to display your dialog you could have something like this in your switch statement for processing the controls clicked by the user:

case CHECK_BOX_ID:

nCheckState = CtrlGetState (szDlgName, CHECK_BOX_ID);

if (nCheckState == BUTTON_CHECKED) then


_WinSubEnableControl(hDlg, ANOTHER_BUTTON_ID, FALSE);

else


_WinSubEnableControl(hDlg, ANOTHER_BUTTON_ID, TRUE);

endif;

For more info on EzDefineDialog check out the InstallScript Language Reference in the help library

Regards