This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- EzDefineDialog and WaitOnDialog not showing dialog
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2011
08:18 AM
EzDefineDialog and WaitOnDialog not showing dialog
Hi
I have created a new Custom Dialog and am trying to display it.
I run the following code however the Dialog does not display.
nCtrl = EzDefineDialog( szDlgName , ISUSER, szDlgName ,0);
NumToStr(szMessage, nCtrl);
MessageBox(szMessage,INFORMATION);
nCtrl = WaitOnDialog(szDlgName);
CtrlSetText( szDlgName, 1305, "ready");
NumToStr(szMessage, nCtrl);
MessageBox(szMessage,INFORMATION);
The first szMessage result is 0, and the next is -100, which i believe means the Dialog is ready, but it does not appear. I am calling this from within a function that is called from the OnFirstUIBefore.
This is a new Dialog so i believe the ID used should be 0, and i have also made sure that szDlgName is identical to the name of the Dialog. I have also made sure that 1305 is the ID of a text field on the Dialog.
Any help would be appreciated.
I have created a new Custom Dialog and am trying to display it.
I run the following code however the Dialog does not display.
nCtrl = EzDefineDialog( szDlgName , ISUSER, szDlgName ,0);
NumToStr(szMessage, nCtrl);
MessageBox(szMessage,INFORMATION);
nCtrl = WaitOnDialog(szDlgName);
CtrlSetText( szDlgName, 1305, "ready");
NumToStr(szMessage, nCtrl);
MessageBox(szMessage,INFORMATION);
The first szMessage result is 0, and the next is -100, which i believe means the Dialog is ready, but it does not appear. I am calling this from within a function that is called from the OnFirstUIBefore.
This is a new Dialog so i believe the ID used should be 0, and i have also made sure that szDlgName is identical to the name of the Dialog. I have also made sure that 1305 is the ID of a text field on the Dialog.
Any help would be appreciated.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2011
08:36 AM
Right, that WaitOnDialog return value is DLG_INIT, which fires before the dialog appears, and it's the next call that makes the dialog appear.
Please see the help topics "Using InstallScript to Implement Custom Dialogs" and "Using InstallScript to Process Dialog Controls" for a slow walkthrough, and "WaitOnDialog Example" for a faster one.
P.S. An unrelated tip: you can use SprintfBox to display numeric values without having to go through NumToStr and MessageBox.
Please see the help topics "Using InstallScript to Implement Custom Dialogs" and "Using InstallScript to Process Dialog Controls" for a slow walkthrough, and "WaitOnDialog Example" for a faster one.
P.S. An unrelated tip: you can use SprintfBox to display numeric values without having to go through NumToStr and MessageBox.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2011
08:45 AM
Ahh, its the Windows Handle.
Thanks for the advice, i've spent most of today trying to get this working.
Will
Thanks for the advice, i've spent most of today trying to get this working.
Will