Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to show .RTF file on custom dialogbox similar to License agreement


3 replies to this topic

Xandeep

Xandeep
  • Full Members
  • 3 posts

Posted 23 November 2018 - 06:32

Hello,

 

Greetings !!!

 

I am using Installshield 2012 Sprint edition with Installscript project type.

 

I wanted to know how to show .RTF (rich text file) on custom dialogbox similar to "License agreement " dialogbox.

 

Firstly, I am not able to add "scrollable text" on dialogbox, So I copied the control from "SdLicense2Ex(RTF)" existing dialogbox, But still I stuck in how to code for this control.

 

I know how to code from custom dialog, and have tried "CtrlSetList()" and "CtrlSetText()" function but no luck.

 

I also tried providing file path in "File Name" property of scrollable text control.

 

Any help will be really appreciable.

 

Thanks & Regards,

Sandeep.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 November 2018 - 09:09

One option is to use the actual SdLicense2Ex and adjust the dialog layout if necessary.

If you want to create a new dialog on your own: Go to Behaviour and Logic > InstallScript. In top of the right window select "Dialog Source" from the left drop down box, then SdLicense2Ex from the rigfht drop down box. This will insert the default code for the SdLicense2Ex dialog in your script, so you can use it as template. Rename the function according to your new dialog and adjust the script as necessary.



Xandeep

Xandeep
  • Full Members
  • 3 posts

Posted 24 November 2018 - 16:39

Thanks Stefan for swift reply,

 

I'm little novice to intallshield, so your solution is bit difficult to understand for me, 

 

I explain what I've implemented so far.

 

I've designed a new custom dialogbox as shown in screen shot in attachment. and wrote below mentioned script for it.

 

export prototype ExFn_EzDefineDialog(HWND);
prototype NUMBER CustomDialog(BYREF BOOL , BYREF BOOL);
 
function NUMBER CustomDialog(bOPT_IN, bOPT_OUT)
BOOL bDone;
NUMBER nCtrl, CONTROL1, CONTROL2, nResult, nDlgOutput;
HWND hwndDlg, hScrollControl;
BOOL bOptIn, bOptOut;
LIST listID;
 
NUMBER  nFlag, nFileHandle;
STRING svLine, svAllText;
begin
 
nResult = EzDefineDialog(DLG_NAME, // nickname for dialog
  ISUSER, // DLL containing the dialog’s resources
  DLG_NAME, // name of dialog in Dialogs view
  0);           // numeric resource ID for dialog; not used here
 
nDlgOutput = 0;
while (!bDone)
 
nCtrl = WaitOnDialog(DLG_NAME);
 
switch (nCtrl)
  case DLG_INIT:
  hwndDlg = CmdGetHwndDlg(DLG_NAME);
  SdGeneralInit(DLG_NAME, hwndDlg, 0, "");

 

  case BUTTON_BACK:
  bDone = TRUE;
  nDlgOutput = BACK;
 
  case BUTTON_NEXT:
  bDone = TRUE;
  nDlgOutput = NEXT;
endswitch;
endwhile;
 
EndDialog(DLG_NAME);
ReleaseDialog(DLG_NAME);
 
The above code works properly, But according your previous post if I add SdLicense2Ex dialog script template, then how can I access custom controls of "SdLicense2Ex" dialogbox. Especially how I can call "WaitOnDialog()" function in SdLicense2Ex dialog template ?
 
Thanks & Regards,
Sandeep K

Attached Images

  • CustomDlg.JPG


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 December 2018 - 19:59

I'm sorry, I don't understand your question.

If you have a good solutiion, then you're done.

If your solution doesn't work, compare it to the SdLicense2Ex script (which does include a call to WaitOnDialog)