about API IMENUCTL_AddItem() | developer.brewmp.com about API IMENUCTL_AddItem() | developer.brewmp.com

Developer

about API IMENUCTL_AddItem()

Forums:

hi friends:
I am a new in this field. Now i am designing a UI including a ITEXT control and a menu used as a list.when i added items to the menu with the above API, it only displayed one item on the screen. anybody could tell me why? thanks a lot! following is my source codes:

uint16 nControlYLoc = 0;
char* psText="123";
AECHAR* pText;
AEERect rc;
pText = (AECHAR*) MALLOC(MAX_WORD_SIZE*sizeof(AECHAR));

testfir_Reset(pApp, FALSE);

// display the ITEXT control
ITEXTCTL_Reset( pApp->m_pText );
ITEXTCTL_SetProperties( pApp->m_pText, TP_FRAME );
ITEXTCTL_SetInputMode( pApp->m_pText, AEE_TM_LETTERS );
ITEXTCTL_SetMaxSize( pApp->m_pText, MAX_WORD_SIZE );
nControlYLoc += pApp->m_nFontHeight + 2;
testfir_DisplayControl( pApp, IDS_DESC, (IControl*) pApp->m_pText, nControlYLoc );

nControlYLoc+=20;
SETAEERECT( &rc, 0, nControlYLoc, pApp->m_pDeviceInfo->cxScreen,pApp->m_pDeviceInfo->cyScreen-nControlYLoc );
IMENUCTL_SetRect( pApp->m_pMenu, &rc );

STRTOWSTR(psText, pText, MAX_WORD_SIZE);

IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);

IMENUCTL_Redraw( pApp->m_pMenu );
ITEXTCTL_SetActive( pApp->m_pText,TRUE );

IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 1, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 2, pText, 0);
try this change da id

IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 1, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 2, pText, 0);
try this change da id

mk.manju wrote:IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 1, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 2, pText, 0);
try this change da id
it works! thanks!

mk.manju wrote:IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 0, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 1, pText, 0);
IMENUCTL_AddItem(pApp->m_pMenu, NULL, 0, 2, pText, 0);
try this change da id
it works! thanks!