12-15-2007, 10:29 PM
Also I was having a problem with GetFirstWindowInMonitor bring up windows that were minimized, here is the fix for that.
Function ( GetFirstWindowInMonitor )
;/;
function# h mon
;Simplified.
rep
,h=GetWindow(h iif(h GW_HWNDNEXT GW_HWNDFIRST)); if(!h) break
,if(MonitorFromWindow(h MONITOR_DEFAULTTONULL)!=mon) continue
,if(!IsWindowVisible(h) or !IsWindowEnabled(h) or (min(h)=1)) continue ;;or (min(h)=1)
,if(GetWindow(h GW_OWNER) or GetWinStyle(h 1)&WS_EX_TOOLWINDOW) continue
,ret h