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 "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