getFocus=u.api("GetFocus","int()");
setFocus=u.api("SetFocus","int(inthwnd)");
enable=u.api("EnableWindow","int(inthwnd,boolenable)")
close=function(hwnd){
::SendMessage(hwnd,0x10/*_WM_CLOSE*/);
}
varshowWindow=u.api("ShowWindow","int(int,int)")
show=function(hwnd,flag=true){
showWindow(hwnd,flag===true?0x5/*_SW_SHOW*/:tonumber(flag));
}
findEx=u.api("FindWindowExA","int(inthWndParent,inthWndChildAfter,stringlpszClass,stringlpszWindow)")
find=u.api("FindWindowA","int(stringlpszClass,stringlpszWindow)")
setTopmost=function(hwnd,top=true){
::SetWindowPos(hwnd,(top)?-1/*_HWND_TOPMOST*/:-2/*_HWND_NOTOPMOST*/,0,0,0,0,0x2/*_SWP_NOMOVE*/|0x1/*_SWP_NOSIZE*/)
}
//try{
SwitchToThisWindow=u.api("SwitchToThisWindow","int(inthwnd,intbRestore)")
setForeground=function(hwnd,restore=1){
returnSwitchToThisWindow(hwnd,restore);
}
/*
}
catch(e){
setForeground=u.api("SetForegroundWindow","int(inthwnd)")
}
*/
getForeground=u.api("GetForegroundWindow","int()")
isVisible=u.api("IsWindowVisible","int(inthwnd)")
isWindow=u.api("IsWindow","int(inthwnd)")
isIconic=u.api("IsIconic","int(inthwnd)")
isZoomed=u.api("IsZoomed","int(inthwnd)")
isEnable=function(hwnd){
return!getStyle(hwnd,0x8000000/*_WS_DISABLED*/)
}
isChild=::User32.api("IsChild","int(intparent,inthwnd)")
/**intellisense(win)
isChild(.(父窗口句柄,子窗口句柄)=判断参数二指定的窗口是否参数一指定窗口的子窗口或隶属子窗口
isVisible(__/*输入窗口句柄*/)=判断窗口是否可见
isWindow(__/*输入窗口句柄*/)=判断是否有效窗口
isIconic(__/*输入窗口句柄*/)=判断窗口是否最小化为任务栏图标
isZoomed(__/*输入窗口句柄*/)=判断窗口是否最大化
isEnable(__/*输入窗口句柄*/)=判断窗口是否启用状态
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-30959-2.html
高喊着防杀伤性武器入侵伊拉克