Checks if a variable's base type is a pointer and window handle.
IsHWnd ( variable )
variable | The variable/expression to check. |
Success: | 1 if the expression is a pointer type AND a valid window handle. |
Failure: | 0 if expression is not a pointer OR not a valid window handle. |
See language datatypes for a detailed description.
GUICtrlGetHandle, IsArray, IsBinary, IsBool, IsFloat, IsInt, IsMap, IsNumber, IsPtr, IsString, VarGetType
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Test if the window was found and display the results.
If IsHWnd($hWnd) Then
MsgBox($MB_SYSTEMMODAL, "", "It's a valid HWND")
Else
MsgBox($MB_SYSTEMMODAL, "", "It's not a valid HWND")
EndIf
EndFunc ;==>Example