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

Help Displaying Custom Dialog


1 reply to this topic

mdoggett

mdoggett
  • Members
  • 11 posts

Posted 24 October 2001 - 12:09

I have created a dialog in the IS7 dialog editor and called it DLG_CHOOSE_UPGRADE. I am then trying to define it and display it using the following code. The problem is that EzDefineDialog return -1. Is there anything I am doing wrong.

By the way how can I get the number assigned to a dialog rather than the String. If I load the _isuser1033.rc file into Developer studio I can see my custom dialog but there is no resource.h file so I cannot find the ID's

I have the West Language pack installed and am building a setup in English and German.

nReturn = EzDefineDialog ("InstallUpgrade", ISUSER, "DLG_CHOOSE_UPGRADE", 0);
if (nReturn = 0) then
// We have defined the dialog we should now display it
bDone = FALSE;
repeat
nRetVal = WaitOnDialog("InstallUpgrade");

// Respond to the user event
//switch (nRetVal)
//endswitch;

until bDone;
else
return -1;
endif;

Thanks

Mark


Christof

Christof
  • Members
  • 56 posts

Posted 25 October 2001 - 09:12

Hi,
I think your error is in the EzDefine. See my code for that.

If you use multi-language setup you need a new  ISWIBuild.dll  to make it work.
You can contact InstallShield support or me for sending the new dll.
I found the multilanguage bug and it is fixed with MP1 and/or the dll.

Here is some code which works in my script:

szDialogName = "DLG_CHOOSE_UPGRADE";
szDialogID = "DLG_CHOOSE_UPGRADE";
EzDefineDialog(szDialogName, ISUSER, szDialogID, NULL );
repeat
nCmdValue = WaitOnDialog(szDialogName);
switch (nCmdValue)
  case DLG_CLOSE:
  Do (EXIT);
  case DLG_ERR:
  MessageBox ("Unable to display dialog. Setup canceled.", SEVERE);
  abort;
  case DLG_INIT:
          // Do init code here.
  case SD_PBUT_CONTINUE:
   nResult = nCmdValue;
   bDone = TRUE;
case SD_PBUT_BACK:
nResult = nCmdValue;
bDone = TRUE;
case SD_PBUT_EXITSETUP:
nResult = nCmdValue;
Do (EXIT);
endswitch;
until bDone;  
EndDialog("DLG_CHOOSE_UPGRADE");
ReleaseDialog("DLG_CHOOSE_UPGRADE");

Greetings
Christof