| |
|
|
|
Description:
ChildWindowFromPoint determined the lever one Kindfensters (Controls) one angegebenen Mainwindow from whom Fensterkoordinaten.
Deklaration:
DEF @ChildWindowFromPoint(3) !USER32,ChildWindowFromPoint
Parameter:
1.Parameter: lever the Mainwindow the The Coordinates in Parameter 2 and 3 related are as LongInt. 2.Parameter: X-Koordinate the sought Kindfensters in the Mainwindow as LongInt. 3.Parameter: Y-Koordinate the sought Kindfensters in the Mainwindow as LongInt.
Return Value:
with success becomes the lever the Fensters zurückgegeben, with one Error becomes 0 zurückgegeben.
Examples:
DEF @GetCursorPos(1) !"USER32","GetCursorPos"
DEF @ChildWindowFromPoint(3) !"USER32","ChildWindowFromPoint"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
Windowstyle 31
Windowtitle "Fenstertitel from the Mausposition holen"
Window 50,75-600,350
Declare pos#,Handle&
@CREATEBUTTON(%HWND,"Test 1",100,100,100,30)
@createtext(%HWND,"Test 2",100,150,100,30)
While 0=0
Sleep 10
DIM POS#,8
GetCursorPos(pos#)
DrawText 0,0,"Global X="+@STR$(@Long(Pos#,0))+@Space$(100)
DrawText 0,20,"Global Y="+@STR$(@Long(Pos#,4))+@Space$(100)
@ScreenToClient(%HWND,Pos#)
Let Handle&=@ChildWindowFromPoint(%HWND,@Long(Pos#,0),@Long(Pos#,4))
DrawText 0,40,"Handle the Fensters on this Punkt="+@STR$(Handle&)+@Space$(100)
DrawText 0,60,"Fenstertitel="+@GetText$(Handle&)+@Space$(100)
Dispose Pos#
Wend
[keywords:05138355a1] Window lever Fensterhandle Coordinates Mausposition mouse position screen Screen Control dialog [/keywords:05138355a1] |
|
|
| |
|
|