I need to know how to determine if a menu's been pulled down and
then to know when it's been released.
The problem: my Crosswords game (a Scrabble clone) can take significant
time to find a move, so I check for events periodically from within the
search engine and suspend the search so the main event loop can handle
the events. On nil events I resume the search. The OS handles events
that it interprets as pulling down a menu, with the effect that the user
can have a menu pulled down while the search engine is working in the
background.
This is good until the engine finishes. Now I want to redraw the
board to reflect what the newest move is. But if the menu is still
down I'll wind up overwriting the menu bits drawn by the OS, at which
point the user thinks the menu's suddenly gone away. This is not
good.
So what I want to do is not resume the search while there's a menu
visible. I tried testing for MenuGetActiveMenu() != NULL, but it
appears that MenuGetActiveMenu() stops returning NULL once any menu's
been invoked, ever. And while I could try setting a flag when
MenuHandleEvent() returns true, I'm not sure when I'd clear that flag.
Certainly not (only) after handling every menu selection.
Any and all help appreciated!
Thanks,
--Eric House
******************************************************************************
* From the desktop of: Eric House, [EMAIL PROTECTED] *
* Check out Crosswords for PalmOS: <http://www.peak.org/~fixin/xwords> *
* "The instructions said 'Win98 or better' -- so I installed Linux" *
******************************************************************************