Hier mal mit Abfrage SciTE-Fenster. Kannst auch mal mein Dll-Tut anschauen.
[autoit]Opt('WinTitleMatchMode', 2)
$hWnd = WinGetHandle('SciTE')
ConsoleWrite(GetClassName($hWnd) & @CRLF)
Func GetClassName($hWnd)
Local $LPTSTR = DllStructCreate('char[256]')
Local $ret = DllCall("user32", 'long', "GetClassName", 'hwnd', $hWnd, 'ptr', DllStructGetPtr($LPTSTR), 'long', 256)
If @error Or $ret[0] = 0 Then
Return 0
Else
Return DllStructGetData($LPTSTR, 1)
EndIf
EndFunc