cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
FlexeraFan
Level 5

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?

 

 

Labels (1)
0 Kudos
(2) Solutions
Jenifer
Flexera Alumni

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/CtrlGetUrlForLinkClickedExmp.htm?

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

 

 

View solution in original post

Varaprasad
Level 7 Flexeran
Level 7 Flexeran

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

 

View solution in original post

(2) Replies
Jenifer
Flexera Alumni

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/CtrlGetUrlForLinkClickedExmp.htm?

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

 

 

Varaprasad
Level 7 Flexeran
Level 7 Flexeran

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