Function Reference

IsHWnd

Checks if a variable's base type is a pointer and window handle.

IsHWnd ( variable )

 

Parameters

variable The variable/expression to check.

 

Return Value

Success: Returns 1 if the expression is a pointer type AND a valid window handle.
Failure: Returns 0 if expression is not a pointer OR not a valid window handle.

 

Remarks


 

Related

IsArray, IsFloat, IsInt, IsPtr, IsString, IsNumber, IsBool, GUICtrlGetHandle, IsBinary, VarGetType

 

Example


Run("notepad.exe")
Local $hWnd = WinGetHandle("[CLASS:Notepad]")
If IsHWnd($hWnd) Then
    MsgBox(4096, "", "It's a valid HWND")
Else
    MsgBox(4096, "", "It's not an HWND")
EndIf