Hi there,
There's been some touching on this subject already, but I wanted to
clarify something. I have an app that display a 'progress' style of form
so that the user can know what's going on. The form is displayed from an
alarm handler. The code looks like this:
*****
mPreviousWinHandle = ::WinGetDrawWindow();
mFormSentry = FrmDeleteFormSentry(::FrmInitForm(inFormID));
::FrmDrawForm(mFormSentry.Get());
...do some stuff
mFormSentry = FrmDeleteFormSentry(0); // Calls FrmDeleteForm
if (mPreviousWinHandle)
{
::WinSetDrawWindow(mPreviousWinHandle);
::WinSetActiveWindow(mPreviousWinHandle); // THIS BIT HAS HAD TO BE
ADDED
}
*****
The point is that I now have to call WinSetActiveWindow as well as
WinSetDrawWindow otherwise I get a bus error when my app subsequently
attempts to draw to its display (CtlSetLabel bombs out).
What I would like to know is:
* Why do I now have to call WinSetActiveWindow as well?
* Am I doing something unorthodox i.e. is there a better way of
displaying progress info. from a handler that might not have
globals (such as is the case with alarm handlers)?
Thanks!
Kind regards,
--
Christopher Hunt
Class Action Pty. Ltd.
Complete time zone management for the Palm(tm) connected organizer.
Check out http://www.classactionpl.com/