cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kemmererm
Level 3

WaitOnDialog only returns -1

I created 2 custom Dialogs and used nearly identical code for both of them but for some reason only the first one i created works. WaitOnDialog for the second one only returns -1.

First I had a problem because they were both created with a resource identifier of 0, I changed the second dialog to have a a resource identifier of 1.

Here is the code I use to create the dialog:

function NUMBER RemoteSiteDlg()
STRING szDlgName;
BOOL bDone;
NUMBER nCtrl;
begin

szDlgName = "RemoteSiteDlg";
bDone = FALSE;

nCtrl = EzDefineDialog(szDlgName, ISUSER, szDlgName, 0);

if (nCtrl = DLG_ERR_ALREADY_EXISTS) then
MessageBox("Dialog already exists", SEVERE);
abort;
elseif (nCtrl = DLG_ERR) then
MessageBox("Unspecified error", SEVERE);
abort;
endif;

while (!bDone)

nCtrl = WaitOnDialog(szDlgName);

switch(nCtrl)

case DLG_INIT:

case DLG_ERR:
MessageBox("WaitOnDialog Error DLG_ERR", SEVERE);
abort;

case NEXT:
bDone = TRUE;

case BACK:
bDone = TRUE;

case CANCEL:
Do(EXIT);

endswitch;

endwhile;

EndDialog(szDlgName);
ReleaseDialog(szDlgName);

return nCtrl;

end;


I checked and triple checked to make sure that the value in szDlgName is the actual name of the Dialog as it appears on the dialog pane. Is there a way to get a more descriptive error message out of the install shield interface?
Labels (1)
0 Kudos
(1) Reply
kemmererm
Level 3

This issue appears to be that resource identifier needs to be 0 and that i misdiagnosed the earlier problem that caused me to change it to 1. What does the resource identifier do?
0 Kudos