Jump to content
Sign in to follow this  


Recommended Posts


hi, my english is very poor, excuse me for this

problème, attribute setmenucolor for TrayItemGetHandle & GUICtrlGetHandle

an exemple for help autoit

Func SetMenuColor($nMenuID, $nColor)

If @OSVersion = "WIN_95" Or @OSVersion = "WIN_NT4" Then Return

$hMenu = TrayItemGetHandle($nMenuID)

;$hMenu = GUICtrlGetHandle($nMenuID)

$hBrush = DllCall("gdi32.dll", "hwnd", "CreateSolidBrush", "int", $nColor)

$hBrush = $hBrush[0]

Local $stMenuInfo = DllStructCreate("dword;dword;dword;uint;dword;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))

$stMenuInfo = 0


I have autoitscript of origin

by which method I could allot the color au two element?

thank you and please still excuse me for my language (i'm french, sorry)

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this