Funktionreferenz


_GUICtrlMenu_GetMenuInfo

Beschreibung anzeigen in

Ermittelt Informationen über ein festgelegtes Menü

#include <GuiMenu.au3>
_GUICtrlMenu_GetMenuInfo ( $hMenu )

Parameter

$hMenu Handle des Menüs

Rückgabewert

Erfolg: eine $tagMENUINFO Struktur
Fehler: Setzt das @error Flag auf ungleich null

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

Verwandte Funktionen

$tagMENUINFO, _GUICtrlMenu_SetMenuInfo

Siehe auch

Suche nach GetMenuInfo in der MSDN Bibliothek.

Beispiel

#include <GuiMenu.au3>

Example()

Func Example()
    Local $hWnd, $hMain, $hFile, $tInfo

    ; Startet den Editor
    Run("notepad.exe")
    WinWaitActive("[CLASS:Notepad]")
    $hWnd = WinGetHandle("[CLASS:Notepad]")
    $hMain = _GUICtrlMenu_GetMenu($hWnd)
    $hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)

    ; Ermittelt/Setzt die Datei Menü Informationen
    $tInfo = _GUICtrlMenu_GetMenuInfo($hFile)
    Writeln("Menü Stil ..........: " & DllStructGetData($tInfo, "Style"))
    Writeln("Maximale Menü Höhe .....: " & DllStructGetData($tInfo, "YMax"))
    Writeln("Hintergrundmuster des Menüs: " & DllStructGetData($tInfo, "hBack"))
    Writeln("Kontext Hilfe-ID des Menüs : " & DllStructGetData($tInfo, "ContextHelpID"))
    Writeln("Menü Daten ...........: " & DllStructGetData($tInfo, "MenuData"))
    Writeln("")
    $tInfo = DllStructCreate($tagMENUINFO)
    DllStructSetData($tInfo, "Size", DllStructGetSize($tInfo))
    DllStructSetData($tInfo, "Mask", BitOR($MIM_HELPID, $MIM_MAXHEIGHT, $MIM_MENUDATA))
    DllStructSetData($tInfo, "YMax", 100)
    DllStructSetData($tInfo, "ContextHelpID", 1234)
    DllStructSetData($tInfo, "MenuData", 4567)
    _GUICtrlMenu_SetMenuInfo($hFile, $tInfo)
    $tInfo = _GUICtrlMenu_GetMenuInfo($hFile)
    Writeln("Menü Stil ..........: " & DllStructGetData($tInfo, "Style"))
    Writeln("Maximale Höhe des Menü .....: " & DllStructGetData($tInfo, "YMax"))
    Writeln("Hintergrundmuster des Menüs: " & DllStructGetData($tInfo, "hBack"))
    Writeln("Kontext Hilfe-ID des Menüs : " & DllStructGetData($tInfo, "ContextHelpID"))
    Writeln("Menü Daten ...........: " & DllStructGetData($tInfo, "MenuData"))
    Writeln("")
EndFunc   ;==>Example

; Schreibt eine Zeile mit Text in den Editor
Func Writeln($sText)
    ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc   ;==>Writeln