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

custom dialog title


2 replies to this topic

pfuntner

pfuntner
  • Members
  • 5 posts

Posted 13 February 2002 - 13:40

I'm using InstallShield Professional 5.53 and need to create a custom dialog because the AskOptions() dialog doesn't allow much room for the text above the options.  I have followed the custom dialog example provided with the product and am pretty happy with it but am having trouble setting the title of the dialog.  I need to do this if and when my product has text strings translated into different languages.

I am already using CtrlSetText() to set the text of the message and options in my custom dialog and they work great.  I tried doing something similar for the title but it doesn't change. Below is a fragment of my setup script.  Can anyone tell me what I'm doing wrong?

  // Register the dialog in the script.
  EzDefineDialog("CUSTOM1", ISUSER, "", ID_CUSTOM_DIALOG);

  // Display the dialog box.
  bDone = FALSE;
  while (bDone=FALSE)
     nCmdValue = WaitOnDialog("CUSTOM1");

     switch (nCmdValue)

        case DLG_INIT:
           CtrlSetText("CUSTOM1", ID_CUSTOM_DIALOG,  title);
           CtrlSetText("CUSTOM1", ID_CUSTOM_TEXT,    topText);
           CtrlSetText("CUSTOM1", ID_CUSTOM_OPTION1, option1Text);
           CtrlSetText("CUSTOM1", ID_CUSTOM_OPTION2, option2Text);


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 13 February 2002 - 14:10

Use   in DLG_INIT :

hwndDialog = CmdGetHwndDlg( svDlg );
SetWindowText( hwndDialog, svTitle );
 
In your case, svDlg would be "CUSTOM1". Btw, I would recommend storing 'CUSTOM1' in a string variable, and using this variable (as in the example). This way you're always certain you specify the right dialogstring and don't accidentilly mayke a typo.

Ide


pfuntner

pfuntner
  • Members
  • 5 posts

Posted 13 February 2002 - 14:43

Thank you, Ide!  That's just what I wanted! 8-)