首页 获取其它运行程序的按钮的句柄的API函数

获取其它运行程序的按钮的句柄的API函数

举报
开通vip

获取其它运行程序的按钮的句柄的API函数获取其它运行程序的按钮的句柄的API函数是什么?怎么使用? 【lc_mtt】: 不仅仅是一个api可以解决问题。 【plsandslp】: 麻烦具体说一下,谢了 【IORI915189】: 获取当前焦点句柄 getfocus     查找窗口句柄 findwindow     枚举子窗口 enumchildwindows 你可以枚举子窗口获取按钮内容对比 【dabie】: findwindow  '找到窗口句柄 findwindowex  '找到窗体上按钮句柄 dim wnd as long  wnd = ...

获取其它运行程序的按钮的句柄的API函数
获取其它运行程序的按钮的句柄的API 关于工期滞后的函关于工程严重滞后的函关于工程进度滞后的回复函关于征求同志党风廉政意见的函关于征求廉洁自律情况的复函 数是什么?怎么使用? 【lc_mtt】: 不仅仅是一个api可以解决问题。 【plsandslp】: 麻烦具体说一下,谢了 【IORI915189】: 获取当前焦点句柄 getfocus     查找窗口句柄 findwindow     枚举子窗口 enumchildwindows 你可以枚举子窗口获取按钮内容对比 【dabie】: findwindow  '找到窗口句柄 findwindowex  '找到窗体上按钮句柄 dim wnd as long  wnd = FindWindow("窗体类名", "窗体名") wnd = FindWindowEx(wnd, 0, "控件类名", "控件名")  最后的wnd就是你要的控件的句柄了。 【chenhui530】: 最简单的是: FindWindowEx(FindWindow(VbNullString,"Form1"),VbNullString,"确定") 如果这个不行用下面这个。 Private Const GW_HWNDNEXT = 2 Private Const GW_CHILD = 5 Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Function FindControlHwnd(ByVal nHwnd As Long,ByVal findStr As String) As Long     Dim fHwnd As Long, myStr As String, sHwnd As Long     fHwnd = GetWindow(nHwnd, GW_CHILD)     If fHwnd = 0 Then Exit Function     Do While fHwnd > 0         myStr = String(100, Chr$(0))         GetWindowText fHwnd, myStr, 100                  If Left(myStr,InStr(myStr, Chr$(0))-1)=findStr Then FindControlHwnd=fHwnd:Exit Function         sHwnd = GetWindow(fHwnd, GW_CHILD)         If sHwnd > 0 Then             SearchAllControl fHwnd         End If         fHwnd = GetWindow(fHwnd, GW_HWNDNEXT)     Loop End Function Private Sub Form_Load()     FindControlHwnd FindWindow(vbNullString, "Form1"),"确定" End Sub 如果上面这个 方法 快递客服问题件处理详细方法山木方法pdf计算方法pdf华与华方法下载八字理论方法下载 不行再试这个其实应该是差不多的 新建一个窗体用下面代码 EnumChildWindows FindWindow(vbNullString, "Form1"), AddressOf EnumChildWindowsProc, ByVal 0& 再建个模块用下面代码 Public Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Public findHwnd As Long Public Function EnumChildWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Boolean     Dim str As String * 255,hLen As Long     hLen = GetWindowTextLength(hwnd)+1     GetWindowText hwnd, str, 255     if Left(str, hLen) = "确定" Then findHwnd=hwnd : EnumChildWindowsProc=False     EnumChildWindowsProc = True End Function 【sxycgxj】: SearchAllControl  是什么,不是API函数,也没有找到这个过程的定义 【chenhui530】: 错了改成FindControlHwnd就行了
本文档为【获取其它运行程序的按钮的句柄的API函数】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_827985
暂无简介~
格式:doc
大小:25KB
软件:Word
页数:3
分类:互联网
上传时间:2013-09-08
浏览量:34