Function Reference


IsHWnd

Show description in

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: 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.

Remarks

See language datatypes for a detailed description.

Related

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

Example

#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