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 "Extras\HelpFileInternals.au3"

#include <GuiMenu.au3>

Global $g_hWnd

Example()

Func Example()
    Local $hMain

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

    ; Check return value
    Writeln("Is Menu: " & _GUICtrlMenu_IsMenu($g_hWnd))
    Writeln("Is Menu: " & _GUICtrlMenu_IsMenu($hMain))

    _NotepadForceClose($g_hWnd)
EndFunc   ;==>Example

; Write a line of text to Notepad
Func Writeln($sText, $hWnd = $g_hWnd)
    ControlSend($hWnd, "", ControlGetFocus($hWnd), $sText & @CRLF)
EndFunc   ;==>Writeln