Summary
The CtrlSetText function is provided for changing static text dynamically in a custom dialog box. This function can also be used with some Sd dialog boxes. Here are some tips to keep in mind when using the CtrlSetText function with Sd dialog boxes:Synopsis
This article discusses how to change the static text in a custom or Sd dialog box.
Discussion
The CtrlSetText function is provided for changing static text dynamically in a custom dialog box.
This function can also be used with some Sd dialog boxes. Here are some tips to keep in mind when using the CtrlSetText function with Sd dialog boxes:
- CtrlSetText should not be used with built-in dialog boxes. Changing the static text in a built-in dialog could cause the dialog box not to function correctly.
- The dialog box must already be defined with EzDefineDialog before calling CtrlSetText. With the exception of SdShowMsg, you must call CtrlSetText from the appropriate Sd dialog box script file since the dialog is not defined during the Sd dialog function call. For more information, please refer to InstallShield Knowledge Base article Q100161 "HOWTO: Modifying Sd Dialog Boxes".
- CtrlSetText does not work with static text fields that have an ID of -1. An ID of -1 for a static text field means that the text should not be changed.
- This function can be used to change the message being displayed in the SdShowMsg dialog box. Remember, however, that the existing dialog box will not be resized when the text changes, so the new text should be about the same size as the existing text in the dialog box.
Note: When the SdShowMsg function is called with the FALSE parameter to dismiss the dialog box, the text string that is passed to the function is ignored. If you're using the FALSE option, it is not necessary to make sure that the text passed to the function is the same size as the text previously displayed in the dialog box.
Here is an example of using the CtrlSetText function to change the text of an SdShowMsg dialog box:
////////// Begin script sample
declare
// includes
#include "Sddialog.h"
// variable declaration
STRING szFileName, szMsg;
NUMBER nResult;
program
start:
// display message on screen
szMsg = "Setup is searching for installed components...";
SdShowMsg(szMsg, TRUE);
//search for files *.grp
nResult = FindAllFiles (WINDIR, "*.grp", szFileName, RESET);
//continue search
while (nResult = 0)
nResult = FindAllFiles (WINDIR, "*.grp", szFileName, CONTINUE);
endwhile;
// remove message
szMsg = "Done";
CtrlSetText(SD_DLG_SHOWMSG, SD_STA_MSG, szMsg);
Delay(1);
SdShowMsg(szMsg, FALSE);
exit;
#include "Sddialog.rul"
/////////// End script sample Additional Information
Additional information on each InstallScript function, including sample code, can be found in their self-titled topics in the InstallShield Help Library. For example, information on the function CtrlSetText can be found in the topic CtrlSetText.
Related Articles
Change Dialog Box Bitmaps 6Number of Views Disabling Custom Dialog Box Controls 3Number of Views How To: Create HotKeys in a Dialog box 4Number of Views Manage Upgrade Configurations Dialog Box 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