PDA

View Full Version : Cancelling during StatusUpdate Dialog



mtupps
04-09-2002, 03:00 PM
Hello All,

When the Status Update Dialog is displayed and the files are being copied to INSTALLDIR, if the end-user wants to CANCEL during this time, it doesn't appear as if the OnCancelling() function is being automatically called.

Is there a way to trap this?
Thanks
Marie

mtupps
05-09-2002, 09:49 AM
OK, so I figured it out myself:

I have figured it out myself. At the end of the OnFirstUIBefore(), I use the following code:

nResult=StatusUpdate(ON, 100);
if(nResult=CANCEL) then
bInstallAborted=TRUE;
Disable(STATUSEX);
Disable(DIALOGCACHE);
ConfirmCancel();
endif;

Then my ConfirmCancel() looks like this:

SetDialogTitle (DLG_ASK_YESNO, "Cancel Installation");

if (AskYesNo("Are you sure you want to Cancel the Installation?", NO) = YES) then
Disable(STATUSEX);
Disable(DIALOGCACHE);
bInstallAborted=TRUE;
CleanUpInstall();
endif;

:D