cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
FlexeraFan
Occasional contributor

How to set szTitle and szMessage in custom dialog box

Jump to solution

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?

 

 

0 Kudos
2 Solutions

Accepted Solutions
Flexera Jenifer
Flexera

Re: How to set szTitle and szMessage in custom dialog box

Jump to solution

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:

https://helpnet.flexerasoftware.com/installshield23helplib/Subsystems/LangRef/helplibrary/CtrlGetUrl...

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

 

 

Flexera Varaprasad
Flexera

Re: How to set szTitle and szMessage in custom dialog box

Jump to solution

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>);

 

2 Replies
Flexera Jenifer
Flexera

Re: How to set szTitle and szMessage in custom dialog box

Jump to solution

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:

https://helpnet.flexerasoftware.com/installshield23helplib/Subsystems/LangRef/helplibrary/CtrlGetUrl...

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

 

 

Flexera Varaprasad
Flexera

Re: How to set szTitle and szMessage in custom dialog box

Jump to solution

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>);