Summary
This article explains how a control can be hidden or moved during installation run time.Synopsis
InstallScript does not have any built-in methods to hide or move a dialog control programmatically. The controls need to be modified in the Dialogs view. To modify the controls programmatically during runtime, the Windows APIs WinSubShowWindow and MoveWindow function can be used.
Discussion
The following are steps are an example that can be used to hide a control. Steps 1 and 2 can be used to get the handle of the control before moving the control with MoveWindow.- Get the handle to the dialog. This is done using the CmdGethwndDlg function:
hwndDlg = CmdGetHwndDlg( szDlg );
Where
hwndDlgis a variable defined as a handle, andszDlgis the dialog on which the desired control appears. - Get the handle to the control that will be used later. This is done with the GetDlgItem command:
hCtrl = GetDlgItem(hwndDlg, SD_RADIO_COMPACT);
- Use the function that hides the control. This is done using the ShowWindow function. The following is a sample:
nResult = ShowWindow(hCtrl, SW_HIDE);
In the function, the first parameter used is the handle to the dialog you received in Step 2. The second parameter is the constant that is defined for you that states to hide the control.
Additional Information
For more information on the functions used in this article, see InstallShield Help Library topics CmdGetHwndDlg and ShowWindow and the MSDN article GetDlgItem.
Information on the MoveWindow function.
Related Articles
Displaying a File Browse Dialog in an InstallScript Project 3Number of Views "Hint Text in Edit Control" in InstallScript MSI Project 4Number of Views Logging an InstallScript Project 12Number of Views Convert a Basic MSI Project to an InstallScript Project 3Number of Views HOTFIX: Suite Fails with an InstallScript Project (.ism) Package 3Number 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