Determines whether a handle is a menu handle
#include <GuiMenu.au3>
_GUICtrlMenu_IsMenu ( $hMenu )
$hMenu | Handle to be tested |
True: | the handle is a menu handle |
False: | the handle is not a menu handle |
Search IsMenu in MSDN Library.
#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