Don't you need to call MenuDispose() when after the menu (or window that
contains it) is closed?
----------------------------------------------------------------------
I would like to programmatically popup a menu when a user taps on the
upper part of my form. This is my title area, although not a true title
resource, thus the system will not handle a tap in that area. One
solution I've tried is:
if (RctPtInRectangle(eventP->screenX, eventP->screenY, &rect) &&
bDrawMenu)
{
MenuBarType *menuP = MenuInit(DisplayMenuBar);
MenuSetActiveMenu(menuP);
MenuDrawMenu(menuP);
}
Then I look for winEnter and winExit events to appropriately set
bDrawMenu.
This code seems to mimic the natural behavior of the system, but
results in a memory leak. So, how can I properly deallocate the memory
attributable to this resource, or alternatively have the menu popup
without calling MenuInit ?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/