hello all,
Do any of you know how to change the border of a ownerdrawn menu? or like make the entire menu flat instead of the normal 3d look? oh and also.. how do you change the background color of the menu bar without using a toolbar?
thanks..
Do any of you know how to change the border of a ownerdrawn menu? or like make the entire menu flat instead of the normal 3d look? oh and also.. how do you change the background color of the menu bar without using a toolbar?
thanks..
Changing the background color is very easy:
1. grab the menu handle,
2. fill MENUINFO structure with:
a) cbSize always set to size of the structure.
b) fMask set to MIM_BACKGROUND (optionally or'ed with MIM_APPLYTOSUBMENUS)
c) hbrBack set to your brush created by CreateSolidBrush(rgb) or CreatePatternBrush(hbitmap)...
3. call SetMenuInfo
4. call DrawMenuBar to force redraw the menu.
1. grab the menu handle,
2. fill MENUINFO structure with:
a) cbSize always set to size of the structure.
b) fMask set to MIM_BACKGROUND (optionally or'ed with MIM_APPLYTOSUBMENUS)
c) hbrBack set to your brush created by CreateSolidBrush(rgb) or CreatePatternBrush(hbitmap)...
3. call SetMenuInfo
4. call DrawMenuBar to force redraw the menu.
thanks sapero.. Didnt even know that there was an api like setmenuinfo.. guess i should stop using the old win32 reference :D