// Fill in the CtlAddItem structure values
pMenuCtl=(IMenuCtl*)pApp->m_pObj;
IMENUCTL_Reset(pMenuCtl);
IMENUCTL_SetActive(pMenuCtl,FALSE);
rMenuItem.pText=NULL;
rMenuItem.pImage=NULL;
rMenuItem.pszResImage=rMenuItem.pszResText=CMENU_RES_FILE;//resourc file name
rMenuItem.wFont=AEE_FONT_NORMAL;
IMENUCTL_SetProperties(pMenuCtl, IMENUCTL_GetProperties(pMenuCtl) &
~(MP_ICON_TEXT_TOP));
SETAEERECT(&nRect, 0, 0, pApp->m_nScrWidth, pApp->m_nScrHeight);
IMENUCTL_SetRect(pMenuCtl, &nRect);
IMENUCTL_SetActive(pMenuCtl, TRUE);
IDISPLAY_Update(pApp->pIDisplay);
return TRUE;
}
boolean CMenu_InitAppData(CMenu* pMe)
{
// Get the device information for this handset.
// Reference all the data by looking at the pMe->DeviceInfo structure
// Check the API reference guide for all the handy device info you can get
pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
// Insert your code here for initializing or allocating resources...
pMe->pIShell=pMe->a.m_pIShell;
pMe->pIDisplay=pMe->a.m_pIDisplay;
// Insert your code here for initializing or allocating resources...
pMe->m_nLineHeight=IDISPLAY_GetFontMetrics(pMe->a.m_pIDisplay,
AEE_FONT_NORMAL,
NULL,
NULL);
pMe->m_nLargeLineHeight=IDISPLAY_GetFontMetrics(pMe->a.m_pIDisplay,
AEE_FONT_LARGE,
NULL,
NULL);
pMe->m_nScrHeight=pMe->DeviceInfo.cyScreen;
pMe->m_nScrWidth=pMe->DeviceInfo.cxScreen;
SETAEERECT(&pMe->m_nCIntAreaRect,
0,
0,
pMe->DeviceInfo.cxScreen,
pMe->DeviceInfo.cyScreen-pMe->m_nLargeLineHeight);
pMe->m_pObj=NULL;
// if there have been no failures up to this point then return success
return TRUE;
}