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

Developer

Forums

Forums:

Hi, All
How to set the Back and Fore color of a IMenuCtl Control. I have tried with the following code but can't succeeded and not able to figure out why the back and fore color of menu is not setting though the other items of the menu are colored.

pMe->screenMenuColor.wMask=MC_BACK|MC_TEXT|MC_FRAME|MC_SCROLLBAR|MC_SCROLLBAR_FILL|MC_SEL_BACK|MC_SEL_TEXT|MC_TITLE|MC_TITLE_TEXT;
pMe->screenMenuColor.cBack=RGB_WHITE;
pMe->screenMenuColor.cSelBack=CTL_SELECTED_BACK_COLOR;
pMe->screenMenuColor.cFrame=PROGRESS_BAR_COLOR;
pMe->screenMenuColor.cScrollbar=CTL_SELECTED_BACK_COLOR;
pMe->screenMenuColor.cScrollbarFill=CTL_SELECTED_FORE_COLOR;
pMe->screenMenuColor.cSelText=CTL_SELECTED_FORE_COLOR;
pMe->screenMenuColor.cTitle=MAKE_RGB(255,0,0);
pMe->screenMenuColor.cTitleText=MAKE_RGB(0,255,0);

//its change color of menu except title and title background.
IMENUCTL_SetColors(pMe->pIComboMenu,&pMe->screenMenuColor);

Help Appreciated :confused:

Hi
R u trying to get the Selected menu and unselected menu color?
If yes then the below code should work for u.
menuSelected.wMask = MC_SEL_BACK;
menuSelected.cSelBack = MAKE_RGB(255,255,0);
IMENUCTL_SetColors(pMe->pIMenu,&menuSelected);
menuUnselected.wMask = MC_BACK;
menuUnselected.cBack = DARK_BLUE;//MAKE_RGB(225,225,225);
IMENUCTL_SetColors(pMe->pIMenu,&menuUnselected);
Hope this helps
Akshay

Hi
R u trying to get the Selected menu and unselected menu color?
If yes then the below code should work for u.
menuSelected.wMask = MC_SEL_BACK;
menuSelected.cSelBack = MAKE_RGB(255,255,0);
IMENUCTL_SetColors(pMe->pIMenu,&menuSelected);
menuUnselected.wMask = MC_BACK;
menuUnselected.cBack = DARK_BLUE;//MAKE_RGB(225,225,225);
IMENUCTL_SetColors(pMe->pIMenu,&menuUnselected);
Hope this helps
Akshay

Hi ,Akshay
Thanks for reply.
The above question posted by me about IMenuText Control's title back and fore colors, (I regret for the missing word title ).
Is it possible to change the menu title back or fore colors, the above code is only change the selected or unselected text , but I want to change title color of the IMenuControl.
waiting for your reply....

Hi ,Akshay
Thanks for reply.
The above question posted by me about IMenuText Control's title back and fore colors, (I regret for the missing word title ).
Is it possible to change the menu title back or fore colors, the above code is only change the selected or unselected text , but I want to change title color of the IMenuControl.
waiting for your reply....

Call IMENUCTL_SetColors()
CLR_SYS_TITLE Background of title text.
CLR_SYS_TITLE_TEXT Color of title text.
Passing NULL to this function resets the menu colors.

Call IMENUCTL_SetColors()
CLR_SYS_TITLE Background of title text.
CLR_SYS_TITLE_TEXT Color of title text.
Passing NULL to this function resets the menu colors.