ChildWindowFromPoint,ChildWindowFromPointEx
VB声明
Declare Function ChildWindowFromPoint Lib "user32" Alias "ChildWindowFromPoint" (ByVal hWnd As Long, ByVal xPoint As Long, ByVal yPoint As Long) As Long
Declare Function ChildWindowFromPointEx Lib "user32" Alias "ChildWindowFromPointEx" (ByVal hWnd As Long, ByVal pt As POINTAPI, ByVal un As Long) As Long
说明
返回父窗口中包含了指定点的第一个子窗口的句柄
返回值
Long,发现包含了指定点的第一个子窗口的句柄。如未发现任何窗口,则返回hWnd(父窗口的句柄)。如指定点位于父窗口外部,则返回零
参数表
参数 类型及说明
hWnd Long,父窗口的句柄
xPoint Long,点的X坐标,以像素为单位
yPoint Long,点的Y坐标,以像素为单位
pt POINTAPI,点的坐标,以像素为单位
un Long,(只适用于ChildWindowFromPointEx)控制对窗口的搜索。参见下表
CWP_ALL 测试所有窗口
CWP_SKIPINVISIBLE 忽略不可见窗口
CWP_SKIPDISABLED 忽略已屏蔽的窗口
CWP_SKIPTRANSPARENT 忽略透明窗口

Top