Posts: 1,271
Threads: 399
Joined: Mar 2003
do you have a general function for dealing with windows on multiple screens/monitors?
i would like to min all windows on the second screen when windows media center is running fullscreen.
Posts: 1,271
Threads: 399
Joined: Mar 2003
a monitor trigger?
i already have two handmade toolbars on my 2 monitors.
it would be nice to resemble the windows show desktop button per monitor.
Posts: 12,095
Threads: 142
Joined: Dec 2002
no.
Get all windows, call MonitorFromWindow...
Posts: 1,271
Threads: 399
Joined: Mar 2003
Function
who_is_where
out
int hwnd hMonitor;str exe
MONITORINFO mi.cbSize=sizeof(mi)
str titles
ARRAY(int) handles
GetWindowList &titles "" 1|2|4 0 0 handles
ARRAY(str) arr = titles
for(int'i 0 arr.len)
,hwnd=handles[i]
,exe.getwinexe(hwnd 1)
,hMonitor=MonitorFromWindow(hwnd MONITOR_DEFAULTTONEAREST)
,GetMonitorInfo(hMonitor &mi)
,sel mi.dwFlags
,,case 1
,,,out "%s - on primary screen" exe
,if mi.dwFlags=1
,else
,,out "%s - on second screen" exe