PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Richard Kelly on November 25, 2011, 10:47:12 PM

Title: Menu Bar
Post by: Richard Kelly on November 25, 2011, 10:47:12 PM
Is it possible to alter the color of the FF menu bar? I can get the forms top level menu background color changed in the forms create function with:


Local udtMenuInfo       As MENUINFO

    udtMenuInfo.cbSize = SizeOf(udtMenuInfo)
    GetMenuInfo (HWND_MAIN_TOPMENU, udtMenuInfo)
    udtMenuInfo.fmask = %MIM_BACKGROUND
    udtMenuInfo.hbrBack = CreateSolidBrush(Rgb(218,232,245))
    SetMenuInfo (HWND_MAIN_TOPMENU, udtMenuInfo)


It's the submenus I can't get figured out.

*** Update ***

Getting closer...changing udtMenuInfo.fmask = %MIM_BACKGROUND OR %MIM_APPLYTOSUBMENUS gets the submenus. There looks like an area for icons that is still in there to be figured out......

Rick Kelly
Title: Re: Menu Bar
Post by: Richard Kelly on November 26, 2011, 03:00:16 AM
This code modification does the trick...


Local udtMenuInfo       As MENUINFO

    udtMenuInfo.cbSize = SizeOf(udtMenuInfo)
    udtMenuInfo.fmask = %MIM_STYLE
    GetMenuInfo (HWND_MAIN_TOPMENU, udtMenuInfo)
    udtMenuInfo.fmask = %MIM_BACKGROUND Or %MIM_APPLYTOSUBMENUS Or %MIM_STYLE
    udtMenuInfo.dwStyle = udtMenuInfo.dwStyle Or %MNS_NOCHECK
    udtMenuInfo.hbrBack = CreateSolidBrush(Rgb(218,232,245))
    SetMenuInfo (HWND_MAIN_TOPMENU, udtMenuInfo)


Rick Kelly :P