I was looking through the Palm Tutorial and I have what I hope is a very basic
question that I
am just missing.
In Tutorial 2, they use a function SetCurrentMenu() which calls MenuDispose()
and MenuInit() to dispose
the old menu and initialize the current (new) menu.
In Tutorial 3, they eliminate this function saying the current menu is
initialized in the form resource.
What does this mean? In Tutorial 3 I don't see any calls to MenuInit() or
MenuDispose().
Where/How does the menu resource get initialized?
#ifdef saveForReference
// P3. current menu now set in form resource. this routine no longer necessary.
/***********************************************************************
*
* FUNCTION: SetCurrentMenu
*
* DESCRIPTION: P2. This routine loads the specified menu resource and makes
* it the current menu.
*
* PARAMETERS: rscID - resource id of the new menu
*
* RETURNED: nothing
*
***********************************************************************/
static void SetCurrentMenu(Word rscID)
{
// Dispose of an existing current menu.
if (CurrentMenu)
MenuDispose(CurrentMenu);
// Set the current menu and remember it.
CurrentMenu = MenuInit(rscID);
}
#endif