Right. Au3Info shows something different. Maybe it's something I'm not aware of .
Nah!. That's the WindowClass, the control class is Chrome_RenderWidgetHostHWND
Maybe there is some difference what _WindowFromPoint and what _ChildWindowFromPointEx returns
Check this out #include <WinAPI.au3>
#include <Misc.au3>
;Works for Minimized Hidden and disabled Windows
$hWinMain = WinGetHandle("[CLASS:Chrome_WidgetWin_1]")
$tPoint = DllStructCreate($tagPoint)
DllStructSetData($tPoint, 1, 5)
DllStructSetData($tPoint, 2, 71)
;Proceed further when LMouse is pressed
While _IsPressed("01") = 0
Sleep(10) ;Use this to activate the Google Chrome
WEnd
$hLabel = _WinAPI_WindowFromPoint($tPoint) ;_ChildWindowFromPointEx($hWinMain, 5, 71)
MsgBox(64, "Result:", StringFormat("hWnd: %s\nClass: %s", $hLabel, _WinAPI_GetClassName($hLabel)))
Func _ChildWindowFromPointEx($hWnd, $iX, $iY, $iFlags = 0)
Local $Ret = DllCall('user32.dll', 'hwnd', 'ChildWindowFromPointEx', 'hwnd', $hWnd, 'int', $iX, 'int', $iY, 'uint', $iFlags)
If @error Then
Return SetError(1, 0, 0)
EndIf
Return $Ret[0]
EndFunc ;==>_ChildWindowFromPointEx
_WindowFromPoint returns what is shown in Au3Info but thats different from what _ChildWindowFromPointEx returns.
Strange.
Edit: This Link should help http://blogs.msdn.com/b/oldnewthing/archive/2010/12/30/10110077.aspx
Finally found the Solution #include <WinAPI.au3>
#include <Constants.au3>
;Works for Minimized Hidden and disabled Windows
$hWinMain = WinGetHandle("[CLASS:Chrome_WidgetWin_1]")
$hLabel = _WindowFromPointEx($hWinMain, 5, 71) ;Its Slow but works :)
MsgBox(64, "Result:", StringFormat("hWnd: %s\nClass: %s", $hLabel, _WinAPI_GetClassName($hLabel)))
Func _WindowFromPointEx($hWnd, $iX, $iY)
Local $Ret = DllCall('user32.dll', 'hwnd', 'ChildWindowFromPoint', 'hwnd', $hWnd, 'int', $iX, 'int', $iY)
If @error Then
Return SetError(1, 0, 0)
EndIf
Return _WinAPI_GetWindow($Ret[0], $GW_CHILD)
EndFunc ;==>_ChildWindowFromPointEx