Function Reference


_GUICtrlMenu_IsMenu

Determines whether a handle is a menu handle

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

Parameters

$hMenu Handle to be tested

Return Value

True: the handle is a menu handle
False: the handle is not a menu handle

See Also

Search IsMenu in MSDN Library.

Example

#include <GuiMenu.au3>

Example()

Func Example()
        Local $hWnd, $hMain

        ; Open Notepad
        Run("notepad.exe")
        WinWaitActive("[CLASS:Notepad]")
        $hWnd = WinGetHandle("[CLASS:Notepad]")
        $hMain = _GUICtrlMenu_GetMenu($hWnd)

        ; Check return value
        Writeln("Is Menu: " & _GUICtrlMenu_IsMenu($hWnd))
        Writeln("Is Menu: " & _GUICtrlMenu_IsMenu($hMain))
EndFunc   ;==>Example

; Write a line of text to Notepad
Func Writeln($sText)
        ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc   ;==>Writeln