Article View: pilot.programmer
Article #22Re: Disabling the menu
From: Robert Hildinger
Date: Wed, 30 Oct 2002 21:25
Date: Wed, 30 Oct 2002 21:25
53 lines
3026 bytes
3026 bytes
I'm not sure if this is the best way to do it, but you might try
dispatching the event received from EvtGetEvent to your form before
calling SysHandleEvent. I believe the problem is that SysHandleEvent
is seeing the penDown event in the menu area, absorbing it, and
placing a menu event back on to the event queue. If you're using the
typical CW framework app event loop that looks like this:
do {
EvtGetEvent(&event, evtWaitForever);
if (! SysHandleEvent(&event))
if (! MenuHandleEvent(0, &event, &error))
if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);
} while (event.eType != appStopEvent);
then FrmDispatchEvent will never get called for a penDown in the menu
area.
In my program that uses the whole screen area, I process all events
that I want to see first, and if they're not on my list of events to
absorb, only then do I pass them on to SysHandleEvent.
-Robert Hildinger
Donovan Winch <donovan.winch@picsel.com> wrote in message news:<3DBFC375.F79DF1D0@picsel.com>...
> Hey people,
>
> I'm having some difficulty with trying to process events in the top left
> of the screen in a Palm OS 5 application.
>
> The application doesn't have a Palm OS menu. I've removed the default
> one from the resource file, and tried commenting out the "if (!
> MenuHandleEvent(0, &event, &error))" line in the AppEventLoop()
> function, so events shouldn't even be passed to the menu event handler.
>
> I was hoping that this would allow me to use the whole screen (including
> the region usually used as the 'menu bar' at the top) for my own
> nefarious purposes, but any pen events in the top left (where the
> default menu is usually located) don't get passed to my main form as pen
> events (penDownEvent, penUpEvent, penMoveEvent, etc.).
>
> Is there something else I should be doing to disable this area's use as
> a menu, or are there some 'special' events that I need to check for just
> in that area of the screen?
>
> Thanks in advance for any advice.
>
> Donovan Winch.
> (donovan_dot_winch_at_picsel_dot_com)
Technical Details
Message-ID:
<773267fc.0210301325.7cca0cac@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<3DBFC375.F79DF1D0@picsel.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10baa0,daf262c8c2cb4b9c X-Google-Attributes: gid10baa0,public X-Google-Thread: 10c638,daf262c8c2cb4b9c X-Google-Attributes: gid10c638,public X-Google-ArrivalTime: 2002-10-30 13:25:32 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: hildinger@mindspring.com (Robert Hildinger) Newsgroups: pilot.programmer,codewarrior.palm Subject: Re: Disabling the menu Date: 30 Oct 2002 13:25:32 -0800 Organization: http://groups.google.com/ Lines: 53 Message-ID: <773267fc.0210301325.7cca0cac@posting.google.com> References: <3DBFC375.F79DF1D0@picsel.com> NNTP-Posting-Host: 47.230.0.41 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1036013132 24925 127.0.0.1 (30 Oct 2002 21:25:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 30 Oct 2002 21:25:32 GMT