Obtient le pinceau utilisé pour le fond du menu
#include <GuiMenu.au3>
_GUICtrlMenu_GetMenuBackground ( $hMenu )
$hMenu | Handle du contrôle Menu |
_GUICtrlMenu_SetMenuBackground
#include <GuiMenu.au3> #include <WinAPIGdi.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hWnd, $hMain, $hFile, $hBrush ; Ouvre le Bloc-Notes Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") $hWnd = WinGetHandle("[CLASS:Notepad]") $hMain = _GUICtrlMenu_GetMenu($hWnd) $hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0) ; Fond du menu File Writeln("Fond du menu File: 0x" & Hex(_GUICtrlMenu_GetMenuBackground($hFile))) $hBrush = _WinAPI_GetSysColorBrush($COLOR_INFOBK) _GUICtrlMenu_SetMenuBackground($hFile, $hBrush) Writeln("Fond du menu File: 0x" & Hex(_GUICtrlMenu_GetMenuBackground($hFile))) EndFunc ;==>Example ; Ecrit une ligne de texte dans le Bloc-Notes Func Writeln($sText) ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF) EndFunc ;==>Writeln