You may want to take this a step further and do this:
case winEnterEvent:
if (event->data.winEnter.enterWindow ==
(WinHandle)FrmGetFormPtr(MainForm))
onTop = true;
else
m_onTop = false;
break;
case winExitEvent:
if (event->data.winExit.exitWindow ==
(WinHandle)FrmGetFormPtr(MainForm))
onTop = false;
break;
Scott Maxwell
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
> Faherty
> Sent: Wednesday, April 26, 2000 1:24 PM
> To: Palm Developer Forum
> Subject: Re: Menu->attr.visible seems to semi work
>
>
> On 26-Apr-2000 Jason Simpkins wrote:
>
> > I determined that checking the Menu->attr.visible structure
> field seems to
> > tell me the information I need, however, I now get an error message the
> > first time it is encountered that the application has just read from low
> > memory....blah blah blah. Is this error the result of this
> field getting
> > set to NULL by default? How do I avoid the error message? Whats the
> > best/safest way to check for this?
>
> Ahh!! Don't do that :) That was me that suggested that
> attr.visible like 2
> years ago. Use Roger's technique of determining when your window
> is obscured
> or not obscured.
>
> Now I just do something like this in my form handler:
>
> case winEnterEvent:
> if (e->data.winEnter.enterWindow ==
> (WinHandle) FrmGetFormPtr(MainForm))
> stillonmainform = true; else stillonmainform = false;
> break;
>
> stillonmainform is just a global Boolean in this case.
>
>
> /* Chris Faherty <[EMAIL PROTECTED]> */
> /* Your Stock has crashed - you must now restart your system */
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palm.com/devzone/mailinglists.html
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html