Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Oi, I am trying to add the magenta color in as the plain one of itens not selected of the menu with the following function:

IMENUCTL_SetColors(pMe->FMainMenu, NULL, CLR_SYS_TITLE, RGBVAL(0xff,0x00,0xff));

Soon after to activate function the menu.

Only that it is not functioning in the emulator, what of has made a mistake in this function?

Thank You!

Prototype:
void IMENUCTL_SetColors(IMenuCtl * pIMenuCtl, AEEMenuColors * pc)
You might want to consult the API Reference.

Prototype:
void IMENUCTL_SetColors(IMenuCtl * pIMenuCtl, AEEMenuColors * pc)
You might want to consult the API Reference.

Make sure to set the wMask member of AEEMenuColors with all of the items you want to change. Otherwise, unpredicitable results will occur.
I only say that because it's not very clear in the API reference (although it is in there).

Make sure to set the wMask member of AEEMenuColors with all of the items you want to change. Otherwise, unpredicitable results will occur.
I only say that because it's not very clear in the API reference (although it is in there).

I am trying to use a resource string, but It's showing me only the second option i.e Item1. The first option isn't visible.Why It's so. When I have already mentioned the resource name.Please help me.
// code in .h
IMenuCtl *pIMenu;
AEERect qrc;
AEEDeviceInfo di;
AECHAR * szBuf;
//__________________________________________________ ____________
#define APP_RES_FILE "HelloWorld.bar"
AECHAR sz1[]= {'I','t','e','m','1','\0'};
char arr[]=APP_RES_FILE;
//__________________________________________________ _____________
// code in .cpp
ISHELL_CreateInstance(this->m_pIShell, AEECLSID_MENUCTL,(void **)&pIMenu);
ISHELL_GetDeviceInfo(m_pIShell,&di);
qrc.x = 0;
qrc.y = 0;
qrc.dx = di.cxScreen;
qrc.dy = di.cyScreen;
IMENUCTL_SetRect(pIMenu, &qrc);
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, IDS_ITEM1, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, NULL, sz1, NULL);
IMENUCTL_SetActive(pIMenu,TRUE);

I am trying to use a resource string, but It's showing me only the second option i.e Item1. The first option isn't visible.Why It's so. When I have already mentioned the resource name.Please help me.
// code in .h
IMenuCtl *pIMenu;
AEERect qrc;
AEEDeviceInfo di;
AECHAR * szBuf;
//__________________________________________________ ____________
#define APP_RES_FILE "HelloWorld.bar"
AECHAR sz1[]= {'I','t','e','m','1','\0'};
char arr[]=APP_RES_FILE;
//__________________________________________________ _____________
// code in .cpp
ISHELL_CreateInstance(this->m_pIShell, AEECLSID_MENUCTL,(void **)&pIMenu);
ISHELL_GetDeviceInfo(m_pIShell,&di);
qrc.x = 0;
qrc.y = 0;
qrc.dx = di.cxScreen;
qrc.dy = di.cyScreen;
IMENUCTL_SetRect(pIMenu, &qrc);
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, IDS_ITEM1, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, NULL, sz1, NULL);
IMENUCTL_SetActive(pIMenu,TRUE);

I've seen behavior like you describe when the 4th argument (nItemID) is not unique. So, try something like this:
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, 0, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, 1, sz1, NULL);

I've seen behavior like you describe when the 4th argument (nItemID) is not unique. So, try something like this:
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, 0, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, 1, sz1, NULL);

I've seen behavior like you describe when the 4th argument (nItemID) is not unique. So, try something like this:
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, 0, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, 1, sz1, NULL);
________________________________________________________________
Still it doesn't give expected results. If not can u please tell me how to use a string resource to add an item to IMENUCTL. :confused:

I've seen behavior like you describe when the 4th argument (nItemID) is not unique. So, try something like this:
IMENUCTL_AddItem(this->pIMenu ,arr , IDS_ITEM1, 0, NULL, NULL);
IMENUCTL_AddItem(this->pIMenu , NULL , NULL, 1, sz1, NULL);
________________________________________________________________
Still it doesn't give expected results. If not can u please tell me how to use a string resource to add an item to IMENUCTL. :confused: