社区
VB基础类
帖子详情
enumwindow函数为什么无法遍历窗口
menuvb
2003-04-10 09:46:14
EnumWindows AddressOf EnumProc, 0 '遍查窗口
为什么我只能查找出一个,放在TIME事件也不行,!
...全文
145
3
打赏
收藏
enumwindow函数为什么无法遍历窗口
EnumWindows AddressOf EnumProc, 0 '遍查窗口 为什么我只能查找出一个,放在TIME事件也不行,!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
叶帆
2003-04-10
打赏
举报
回复
Public Function GetZiWin(window_hwnd As Long) As String
Dim buflen As Long
Dim child_hwnd As Long
Dim children() As Long
Dim num_children As Integer
Dim i As Integer
'取得类名
buflen = 256
buf = Space$(buflen - 1)
buflen = GetClassName(window_hwnd, buf, buflen)
buf = Left$(buf, buflen)
If Right(buf, 4) = "Edit" Then
'----------
hWindow = window_hwnd
'----------
Exit Function
Else
hWindow = 0
End If
num_children = 0
child_hwnd = GetWindow(window_hwnd, GW_CHILD) '取得第 1 个子窗口的句柄
Do While child_hwnd <> 0 '如果有子窗口
num_children = num_children + 1
ReDim Preserve children(1 To num_children)
children(num_children) = child_hwnd
child_hwnd = GetWindow(child_hwnd, GW_HWNDNEXT) '取得下一个兄弟窗口的句柄
Loop
For i = 1 To num_children
Call GetZiWin(children(i))
Next i
End Function
Public Function EnumProc(ByVal app_hwnd As Long, ByVal lParam As Long) As Boolean '遍查主窗口
Dim buf As String * 1024
Dim length As Long
Dim Title As String
length = GetWindowText(app_hwnd, buf, Len(buf))
Title = Left$(buf, length)
If InStr(Title, "发送消息") Then '判断是否为
Call GetZiWin(app_hwnd)
End If
EnumProc = 1
End Function
wumy_ld
2003-04-10
打赏
举报
回复
up
佛的光辉
2003-04-10
打赏
举报
回复
EnumProc代码怎么写的
遍历
所有
窗口
简单实用的
遍历
窗口
工具。主要通过
Enum
Window
s、
Enum
Child
Window
s
函数
和while循环,实现
遍历
所有
窗口
,希望对您的程序开发有所帮助
Enum
Window
.rar_
Enum
ProcessModule_
enum
window
_子
窗口
_枚举
窗口
_进程图标
枚举系统进程与
窗口
,
窗口
与进程关联,枚举子
窗口
,运用ImageList截取系统图标,枚举进程子模块,可以对任意一个
窗口
发送任意的消息.对学习系统进程、
窗口
管理、进程枚举、
窗口
枚举、
窗口
消息很有帮助
vb-
Enum
Child
Window
s所有
窗口
及子
窗口
句柄
vb-
Enum
Child
Window
s所有
窗口
及子
窗口
句柄
enum
window
列出进程名
一个简单的调用SDK
enum
window
列出进程名,可计算系统中有多少个进程名相同的程序,可检测一个程序多次启动
Enum
Window
枚举当前打开窗体,包括窗体类名,窗体标题,以及与该窗体关联的进程名。
VB基础类
7,785
社区成员
197,585
社区内容
发帖
与我相关
我的任务
VB基础类
VB 基础类
复制链接
扫一扫
分享
社区描述
VB 基础类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章