Setzt das Hintergrundfüllmuster für das Menü
#include <GuiMenu.au3>
_GUICtrlMenu_SetMenuBackground ( $hMenu, $hBrush )
$hMenu | Handle des Menüs |
$hBrush | zu verwendendes füllmuster für den Hintergrund |
Erfolg: | True |
Fehler: | False |
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlMenu_GetMenuBackground
#include <GuiMenu.au3>
#include <WinAPIGdi.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hWnd, $hMain, $hFile, $hBrush
; Startet den Editor
Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
$hWnd = WinGetHandle("[CLASS:Notepad]")
$hMain = _GUICtrlMenu_GetMenu($hWnd)
$hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)
; Menühintergrund
Writeln("Menühintergrund: 0x" & Hex(_GUICtrlMenu_GetMenuBackground($hFile)))
$hBrush = _WinAPI_GetSysColorBrush($COLOR_INFOBK)
_GUICtrlMenu_SetMenuBackground($hFile, $hBrush)
Writeln("Menühintergrund: 0x" & Hex(_GUICtrlMenu_GetMenuBackground($hFile)))
EndFunc ;==>Example
; Schreibt eine Zeile mit Text in den Editor
Func Writeln($sText)
ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc ;==>Writeln