- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to set szTitle and szMessage in custom dialog box
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Suppose I have a custom dialog box. If I set a value for szMsg and szTitle, and then pass it to the .rul file which opens my custom dialog box, then how can I set the title and message to the values passed in?
I can see at the top of each dialog box that their is a control label at the top of each dialog. Name : ControlId_50, and ControlId_51. So how can I set those labels to the szMsg and szTitle values?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @FlexeraFan ,
You can use
SdSetDlgTitle function to set dialog title and use function SdSetStatic to set message of dialog.
You can refer below example how to make use of those two functions:
Sample code would be:
// Put the corresponding Info in the List Field
if( szMsg != "" ) then
SdSetStatic(szDlg, SD_STA_MSG, szMsg);
endif;
SdSetDlgTitle(szDlg, hwndDlg, szTitle);
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Use CtrlSetText command with control identifier value (select ControlId_50, and ControlId_51 and refer properties) as parameter to set custom text for your controls as below.
case DLG_INIT:
hwndDlg = CmdGetHwndDlg("FirstDialog");
SdGeneralInit("FirstDialog", hwndDlg, 0, "");
CtrlSetText("<CustomDialog Name>",<Control Identifier 50 value>,<szMsg >);
CtrlSetText("<CustomDialog Name>",<Control Identifier 51 value>,<szTitle>);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @FlexeraFan ,
You can use
SdSetDlgTitle function to set dialog title and use function SdSetStatic to set message of dialog.
You can refer below example how to make use of those two functions:
Sample code would be:
// Put the corresponding Info in the List Field
if( szMsg != "" ) then
SdSetStatic(szDlg, SD_STA_MSG, szMsg);
endif;
SdSetDlgTitle(szDlg, hwndDlg, szTitle);
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Use CtrlSetText command with control identifier value (select ControlId_50, and ControlId_51 and refer properties) as parameter to set custom text for your controls as below.
case DLG_INIT:
hwndDlg = CmdGetHwndDlg("FirstDialog");
SdGeneralInit("FirstDialog", hwndDlg, 0, "");
CtrlSetText("<CustomDialog Name>",<Control Identifier 50 value>,<szMsg >);
CtrlSetText("<CustomDialog Name>",<Control Identifier 51 value>,<szTitle>);