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
- :
- Dismissing the SdLicense2Rtf dialog immediately
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
‎May 23, 2008
02:46 PM
Dismissing the SdLicense2Rtf dialog immediately
Consider this installscript code:
function OnBegin()
HWND hwnd;
NUMBER nID;
BOOL result;
begin
Disable(BACKBUTTON);
if (SdLicense2Rtf("", "", "", SUPPORTDIR ^ "licenseAgreement.rtf", FALSE) != NEXT) then
abort;
endif;
hwnd = CmdGetHwndDlg(SD_DLG_LICENSE2_RTF);
nID = DLG_CLOSE;
result = FALSE;
SdCloseDlg(hwnd, nID, result);
SdShowMsg("Delaying...", TRUE);
Delay(5);
SdShowMsg("Delaying...", FALSE);
end;
Can someone tell me why the license dialog is never dismissed even after the SdCloseDlg function is called? I wanted to get rid of the license dialog immediately after the user clicks next, but no matter what I try, the dialog hangs around. The subsequent code that displays the "Delaying..." message just overlays itself on top of the License dialog.
Does anyone know of a reliable way to dismiss the license dialog as soon as the user accepts it and clicks on NEXT?
P.S: I have tried EndDialog/ReleaseDialog without any success.
function OnBegin()
HWND hwnd;
NUMBER nID;
BOOL result;
begin
Disable(BACKBUTTON);
if (SdLicense2Rtf("", "", "", SUPPORTDIR ^ "licenseAgreement.rtf", FALSE) != NEXT) then
abort;
endif;
hwnd = CmdGetHwndDlg(SD_DLG_LICENSE2_RTF);
nID = DLG_CLOSE;
result = FALSE;
SdCloseDlg(hwnd, nID, result);
SdShowMsg("Delaying...", TRUE);
Delay(5);
SdShowMsg("Delaying...", FALSE);
end;
Can someone tell me why the license dialog is never dismissed even after the SdCloseDlg function is called? I wanted to get rid of the license dialog immediately after the user clicks next, but no matter what I try, the dialog hangs around. The subsequent code that displays the "Delaying..." message just overlays itself on top of the License dialog.
Does anyone know of a reliable way to dismiss the license dialog as soon as the user accepts it and clicks on NEXT?
P.S: I have tried EndDialog/ReleaseDialog without any success.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 23, 2008
02:49 PM
For one possible cause, if you haven't yet, perhaps look at Disable(DIALOGCACHE) and Enable(DIALOGCACHE)?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 23, 2008
03:06 PM
I will check it out right away but just a quick observation:
The reason the code I posted probably didn't work was because the implementation of the function SdLicense2Rtf actually calls the EndDialog/ReleaseDialog pair internally (I looked it up in the SdLicense2Dlg.rul file). So by the time I call CmdGetHwndDlg, the dialog is long gone. However that still doesn't explain why the dialog hangs around after SdLicense2Rtf returns.
That leads to me your suggestion.. I will report back in a few.
The reason the code I posted probably didn't work was because the implementation of the function SdLicense2Rtf actually calls the EndDialog/ReleaseDialog pair internally (I looked it up in the SdLicense2Dlg.rul file). So by the time I call CmdGetHwndDlg, the dialog is long gone. However that still doesn't explain why the dialog hangs around after SdLicense2Rtf returns.
That leads to me your suggestion.. I will report back in a few.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 23, 2008
03:26 PM
RobertDickau wrote:
For one possible cause, if you haven't yet, perhaps look at Disable(DIALOGCACHE) and Enable(DIALOGCACHE)?
That did it! Robert, you are a life saver.