- 注册时间
- 2011-3-6
- 最后登录
- 1970-1-1
该用户从未签到
|
老生常谈的枚举那些就不说了
说一些很少有人处理的
POINTpt;
GetCursorPos(&pt);
hd=WindowFromPhysicalPoint(pt);
if(hd!=NULL)
{
GetWindowTextA(hd,text,260);
printf("text:%s\n",text);
Sleep(2000);
}
获取当前鼠标所在位置的窗口
随便写个demo在vista以上就antisod
GetCursorPos(&pt);
ScreenToClient(GetDesktopWindow(),&pt);
hd=ChildWindowFromPoint(GetDesktopWindow(),pt);
if(hd!=NULL){
GetWindowTextA(hd,text,260);
printf("text:%s\n",text);
Sleep(2000);
}*/
从某个坐标处开始枚举实际上是枚举的hwd内的窗口坐标要转换成用户坐标
查色比对的就不说了~
很多人爱用的
HWNDhChild=::GetWindow(ParentWnd,GW_CHILD);
for(;hChild!=NULL;hChild=::GetWindow(hChild,GW_HWNDNEXT))
{
}
HWNDWINAPIRealChildWindowFromPoint(
_In_HWNDhwndParent,
_In_POINTptParentClientCoords
);
PhysicalToLogicalPoint
检测隐藏窗口的话就有N+!种方法了太多不说了
以上是相对猥琐的东西了~~~ |
|