hi Gert-Jan,
unfortunately MenuHideItem fails if it is called in frmOpenEvent
I also tried FrmSetMenu followed by MenuHideItem in frmOpenEvent without
success.
Something that might give a clue is that in menuOpenEvent,
eventP->data.menuOpen.menuRscID is always zero whereas the manual says it
should be the Resource ID of the menu.
Has anyone ever got MenuHideItem to work?
regards,
Eamon
++++++++++++++++++++++++++++++++++++++++++++++++
Hi Eamon,
I was wondering whether PalmOS allows you to do this so late. Instead of
doing this on a menuOpenEvent, can you try doing it in the frmOpenEvent of
the underlying form? Or possibly even earlier than that?
Maybe the OS doesn't like you changing the menus when the corresponding
form is already active.
I once tried change a form's menu bar in the form's frmOpenEvent, and that
didn't work well either. Had to do it before the FrmSetActiveForm().
Just guessing,
Gert-Jan
you wrote:
> Date: Mon, 23 Jul 2001 12:33:32 +0100
> From: "Eamon Kelly" <[EMAIL PROTECTED]>
>Subject: HideMenuItem
>
>hi,
>has anyone got "HideMenuItem" to work properly?
>I tried it using this code:
>
>Boolean BaseFrm::EventHandler (EventPtr eventP)
>{
> Boolean bHandled=false;
> switch (eventP->eType)
> {
> case menuOpenEvent:
> MenuHideItem (MyMenuItemID);
> bHandled = true;
> break;
> }
>return bHandled;
>}
>
>the menu in question has 10 items, and MyMenuItemID is item 4.
>When I display the menu, the item is missing - great, but if I select an
>item from the menu after the missing one the Palm freezes - selecting an
>item before the missing one works fine.
>
>In the emulator, this code appears to set the "reserved" byte instead of
>the "hidden" bit, but I tried modifying the bit directly and got the same
>result. I am using an m100 with 3.5.1 ROM
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/