As title, i think is possible because i have found, casually, an example for apply a menu color usign a similiar way of the UDF _GUICtrlMenu* does
#include <WinAPI.au3>
#include <Constants.au3>
#include <GuiMenu.au3>
#NoTrayIcon
Opt("TrayMenuMode", 3)
;~ Global Const $MIM_APPLYTOSUBMENUS = 0x80000000
;~ Global Const $MIM_BACKGROUND = 0x00000002
;~ Global Const $MIIM_BITMAP = 0x00000080
$hGUI = GUICreate("")
TrayCreateItem("Item1")
TrayCreateItem("Item2")
TrayCreateItem("")
$ExitItem = TrayCreateItem("Exit")
TraySetState()
;~ SetMenuColor(0, 0xEEBB99) ; BGR color value, '0' means the tray context menu handle itself
SetItemBmp
($ExitItem, _WinAPI_CreateSolidBitmap($hGUI, 0xFF0000, 11, 11))
_GUICtrlMenu_SetItemBmp(0, $ExitItem, _WinAPI_CreateSolidBitmap($hGUI, 0xFF0000, 11, 11))
While 1
Local $Msg = TrayGetMsg()
Switch $Msg
Case $ExitItem
Exit
EndSwitch
WEnd
; Apply the color to the menu
Func SetMenuColor
($nMenuID, $nColor)
Local $hMenu = TrayItemGetHandle($nMenuID) ; Get the internal menu handle
Local $hBrush = DllCall("gdi32.dll", "hwnd", "CreateSolidBrush", "int", $nColor)
$hBrush = $hBrush[0]
Local $stMenuInfo = DllStructCreate("dword;dword;dword;uint;ptr;dword;ptr")
DllStructSetData($stMenuInfo, 1, DllStructGetSize($stMenuInfo))
DllStructSetData($stMenuInfo, 2, BitOR($MIM_APPLYTOSUBMENUS, $MIM_BACKGROUND))
DllStructSetData($stMenuInfo, 5, $hBrush)
DllCall("user32.dll", "int", "SetMenuInfo", "hwnd", $hMenu, "ptr", DllStructGetPtr($stMenuInfo))
EndFunc ;==>SetMenuColor
Func SetItemBmp
($nItemID, $hBmp)
Local $hMenu = TrayItemGetHandle($nItemID) ; Get the internal menu handle
Local Const $tagMENUITEMINFO = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & _
"ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
Local $tInfo = DllStructCreate($tagMENUITEMINFO)
DllStructSetData($tInfo, "Size", DllStructGetSize($tInfo))
DllStructSetData($tInfo, "Mask", $MIIM_BITMAP)
DllStructSetData($tInfo, "BmpItem", $hBmp)
DllCall("User32.dll", "bool", "SetMenuItemInfoW", "handle", $hMenu, "uint", $nItemID, "bool", True, "struct*", $tInfo)
EndFunc ;==>SetMenuColor
P.S. I don't want to use, if possible, the _GUICtrlMenu_CreatePopup because i don't like that way to manage item with WM_COMMAND, is more easy to use the internal one