anib Posted March 1, 2007 Share Posted March 1, 2007 hi, my english is very poor, excuse me for this problème, attribute setmenucolor for TrayItemGetHandle & GUICtrlGetHandle an exemple for help autoit CODEFunc 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 EndFunc 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now