Summary
Code Sample Disabling Custom Dialog Box ControlsSynopsis
Applies to InstallScript projects. This article provides InstallScript code that disables certain dialog box controls at run time. This code is meant to be run on a dialog with two edit fields, one for an email address and one for a phone number. It prompts the user, before the custom dialog box is displayed, to ask if they have an email address or phone number, and based on that answer the edit box is either disabled or left alone (enabled).
Discussion
The entire custom dialog box script file can be downloaded as an attachment below.
Here are the three functions calls needed to implement this:
//get window handle of custom dialog box
hwndDlg = CmdGetHwndDlg( szDialogName );
//get handle of control in custom dialog box
hwndItem = GetDlgItem( hwndDlg, IDC_EDIT1 );
//disable control
/*EnableWindow will enable or disable the control. */
/* What you want to do dictates whether the parameter is TRUE or FALSE.*/
EnableWindow( hwndItem, FALSE);
Additional Information
For more information see the InstallShield Help Library topic:
? CmdGetHwndDlg
For more information on the APIs used, see the MSDN Library articles:
Related Articles
Disabling the License File Finder Dialog Box 6Number of Views Change Dialog Box Bitmaps 6Number of Views Changing the Static Text in a Custom or Sd Dialog Box 3Number of Views Disabling / Enabling Dialog Controls in InstallScript 3Number of Views Installation does not proceed beyond SetupProgress dialog box 7Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago