> Are you sure it doesn't return true every time after the menu command bar
> has been opened once? I have the same kind of problem and can't seem to
> make things work nicely.
As soon as the command bar closes, the function returns false. I tried this
with OS5.0 on my real T|T, OS4.0 in an emulated m505, and OS3.5.2 in an
emulated HandEra 300. Since I don't use Windows, I can't check it with the
several OS5 and OS6 simulators (Hint to the simulator crew ;-)
Bodo
P.S. Code snippets:
/* somewhere in the event loop: */
/* track opened command bar on OS 3.5 and greater */
if (CmdBarOpen) {
if (!MenuCmdBarGetButtonData (0, NULL, NULL, NULL, NULL)) {
/* this works only if at least one icon is shown */
CmdBarOpen = false;
}
}
/* in the switch that dispatches the events: */
case menuCmdBarOpenEvent:
CmdBarOpen = true;
MenuCmdBarAddButton(menuCmdBarOnRight, Bar/*some*/Bitmap,
menuCmdBarResultMenuItem,
menuId/*some*/, NULL);
return false;
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/