07-29-2008 12:41 AM
07-29-2008 02:59 AM
You could avoid using MessagePopup and realize your own message panel to show with InstallPopup, handling this situation with a simple loop like this one:
int tmpHandle, pnl, ctl;
double tini;
tmpHandle = LoadPanel (.......);
InstallPopup (tmpHandle);
tini = Timer ();
while (Timer () - tini < 10.0) {
GetUserEvent (1, &pnl, &ctl);
}
RemovePopup (0);
With this code you could also add some more buttons for example to handle an "OK / Abort" response from the user. Remember that GetUserEvent traps all commit events generated on the panel, so in case some controls are present that should not determine closing of the panel you should set them to "Normal" instead of "Hot" so that no commit event is generated when the user operates on them.