This is what I do... in my form event handler I have the following:
case winEnterEvent:
if ( eventP->data.winEnter.enterWindow == (WinHandle)FrmGetFormPtr(
FORMID ) &&
eventP-> data.winEnter.enterWindow == (WinHandle)FrmGetFirstForm() )
{
gStopDrawing = false;
}
break;
case winExitEvent:
if ( eventP->data.winExit.exitWindow == (WinHandle)FrmGetFormPtr(
FORMID ) )
{
gStopDrawing = true;
}
break;
FORMID is obviously your current form id... and gStopDrawing is a global.
Then whenever I'm about to update the display I simply check gStopDrawing...
easy.
The way this works is that a menu is just another "window", so as it becomes
active your current form gets sent a winExit event, then when the menu goes
away your form gets a winEnter event.
Cheers,
Gavin.
Alan Perry <[EMAIL PROTECTED]> wrote in message
news:101905@palm-dev-forum...
>
>
> I have an application that I have written to an old PalmOS API to allow
> it to run on old, out-of-date Palm hardware. This question concerns
> menus and does not use the dynamic menus introduced in 3.5 (that's when,
> right?).
>
> The application has text that is updated by timing out the event wait at
> the top of the event loop (to cause flashing and update a clock
> display). However, the display area that has the flashing and clock
> display is near the top of the display and runs into problems when the
> menu is selected.
>
> Is there an event that I can catch to turn off the flashing and clock
> update when the user goes into the menu. Are the silkscreened button
> and the shortcuts the only way into the menu? What event should I catch
> to turn the flashing and clock update back on?
>
> Thanks in advance.
>
> alan
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/