"Bodo Wenzel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Why does the state need to be tracked? > My application runs on OS >= 3.0 that doesn't have MenuCmdBarGetButtonData(). > So I have to detect the opened command bar via the event which occurs only on > OS >= 3.5. > > > It seems to me that once we ensure that all opened/opening command bars > > have at least 1 icon, then any time we want to check the status of the > > command bar (in my case this is very, very, very rarely), we can just use > > "CmdBarOpen = MenuCmdBarGetButtonData(...)" right then, right? > Correct on OS 3.5 and newer. > > > Also, wouldn't it be better to only add the icon if it is required? > Sure, the icon added by my application isn't just for the algorithm.
OK, I coded this up but it does not work for my 5.0 Tungsten T device nor in the emulator running 4.1. I always get false from the MenuCmdBarButtonData(0, NULL, NULL, NULL, NULL) even though whenever I see a menuCmdBarOpenEvent I always add an icon. Are you sure this is all there is to it? Even immediately after the call to MenuCmdBarAddButton (which does work), if I call MCBBD, it returns false! -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
