#include once "window9.bi"

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

function MenuBackColor(byval menu as HMENU, byval colour as integer, byval 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
