Returns an active window attached to a thread, which created a window identified by function's input parameter $hwnd.
- A window handle of any of windows belonging to a thread for which we want to find active window
It is a wrapper around Win32 GetActiveWindow, however not a simple one. Win32 GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue. Win32::GuiTest GetActiveWindow returns an active window attached to a thread, which created a window identified by function's input parameter. So if an application has 10 windows opened, and we would like to know, which is the active one, we call GetActiveWindow giving it a handle of any application's windows.