Retrieves the window handle to the active window attached to the calling process's message queue
#include <WinAPISys.au3>
_WinAPI_GetActiveWindow ( )
| Success: | Handle to the active window attached to the calling process's message queue. |
| Failure: | 0. |
Search GetActiveWindow in MSDN Library.