#include once "window9.bi"

' mising in inc/win/winuser.bi
#ifndef MIM_BACKGROUND
# define MIM_BACKGROUND &H00000002
# define MIM_APPLYTOSUBMENUS &H80000000
#endif

function MenuBackColor(menu as HMENU,colour as integer,submenues as integer) as byte
  dim as MENUINFO mnuInfo
  with mnuInfo
    .cbSize = sizeof(MENUINFO)
    .fMask  = MIM_BACKGROUND
    if (submenues<>0) then .fMask or = MIM_APPLYTOSUBMENUS
    .hbrBack = CreateSolidBrush(colour)
  end With
  function = SetMenuInfo(menu,@mnuInfo)
end function
