查找窗口句柄
来源:互联网 发布:陕西软件行业天网 编辑:程序博客网 时间:2024/05/16 05:54
HWND pParent = ::GetDesktopWindow(); //(HWND)0x001205A8;
HWND pchild = ::GetWindow(pParent,GW_CHILD);
bool b = false;
while (IsWindow(pchild))
{
::GetWindowText(pchild,buf,MAX_SIZE);
if (pchild)
{
if (wcscmp(_T("multiple"),buf) == 0)
{
pchild = ::GetWindow(pchild,GW_CHILD);
m_Dis += buf;
::GetClassName(pchild,buf,MAX_SIZE);
m_className += buf;
b = true;
continue;
}
}
if (b)
{
m_Dis += buf;
::GetClassName(pchild,buf,MAX_SIZE);
m_className += buf;
}
pchild = ::GetWindow(pchild,GW_HWNDNEXT);
}
void TraversalHnadleOfWindow(const wchar_t *pName)
{
HWND pParent = (HWND)0x000709EE;//::GetDesktopWindow();
CString strlog;
SearchHandl(strlog,pParent);
}
static void SearchHandl(CString &strlog,HWND hchild)
{
if (!hchild) return;
hchild = ::GetWindow(hchild,GW_CHILD);
SearchHandl(strlog,hchild);
wchar_t buf[MAX_PATH];
const wchar_t Log[] = L"E:\\findcon.txt";
WriteLog(xu::CStrToStr(Log).c_str(),"--------------level--------------\n",true);
while (::IsWindow(hchild)){
::GetWindowText(hchild,buf,MAX_PATH);
strlog = "cText: ";
strlog += buf;
::GetClassName(hchild,buf,MAX_PATH);
strlog += " cName: ";
strlog += buf;
strlog += "\n";
WriteLog(xu::CStrToStr(Log).c_str(),xu::CStrToStr(strlog).c_str(),true);
hchild = ::GetWindow(hchild,GW_HWNDNEXT);
}
}
- 查找窗口句柄
- 查找窗口句柄
- 查找已知标题窗口句柄
- 查找特定窗口的句柄
- 查找标题已知的窗口句柄,遍历窗口控件句柄
- 查找标题已知的窗口句柄,遍历窗口控件句柄
- 通过程序名称查找窗口句柄
- VB 查找游戏窗口句柄的方法
- VB 查找游戏窗口句柄的方法
- C#查找指定窗口的子窗口的句柄
- 通过创建窗口进程的ID来查找窗口句柄
- Delphi 查找标题已知的窗口句柄,遍历窗口控件句柄
- 查找飞秋的聊天窗口控件句柄
- C++下查找同一标题窗口句柄的方法
- 利用SetProp和GetProp来查找特定窗口句柄
- 窗口句柄
- 递归方式+FindWindow 遍历窗口句柄。查找已知句柄下的所有句柄。按节点方式保存
- 如何得到句柄、窗口句柄
- 来用C#在开源硬件Netduino上搞个httpserver吧
- 用户与内核空间数据交换的方式(7)-sysctl
- iOS平台XML解析类库对比和安装说明
- 用户与内核空间数据交换的方式(8)-syscall
- 用户与内核空间数据交换的方式(9)-netlink
- 查找窗口句柄
- POJ 1925 Spiderman
- hdu4004(二分法)
- Struts2标签随便说说
- 在ubuntu下查看本机地址
- 《30天自制操作系统》读书笔记Day10
- hdu-2147:kiki's game 博弈
- Picture控件显示图片保存为BMP,JPG等格式
- rh423 - Linux客户端利用winbind加入Windows 2008 Enterprise R1/SP1的AD