Ermittelt die Stilinformationen für ein Menü
#include <GuiMenu.au3>
_GUICtrlMenu_GetMenuStyle ( $hMenu )
| $hMenu | Handle des Menüs |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include "Extras\HelpFileInternals.au3"
#include <GuiMenu.au3>
Global $g_hWnd
Example()
Func Example()
Local $hMain, $hFile
; Startet den Editor
Run("notepad.exe")
$g_hWnd = ("[CLASS:Notepad]")
$hMain = _GUICtrlMenu_GetMenu($g_hWnd)
$hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)
; Ermittelt/Setzt den Menüstil
Writeln("Stil des Menüpunktes 'Datei': 0x" & Hex(_GUICtrlMenu_GetMenuStyle($hFile)))
_GUICtrlMenu_SetMenuStyle($hFile, $MNS_NOCHECK)
Writeln("Stil des Menüpunktes 'Datei': 0x" & Hex(_GUICtrlMenu_GetMenuStyle($hFile)))
_NotepadForceClose($g_hWnd)
EndFunc ;==>Example
; Schreibt eine Zeile mit Text in den Editor
Func Writeln($sText, $hWnd = $g_hWnd)
ControlSend($hWnd, "", ControlGetFocus($hWnd), $sText & @CRLF)
EndFunc ;==>Writeln