Posts: 1,271
Threads: 399
Joined: Mar 2003
i think the code is right, but 'MONITORINFO mi' always returns 0.
do you have an idea why ?
int hwnd=win("QM TOOLBAR" "QM_toolbar")
int hMonitor=MonitorFromWindow(hwnd MONITOR_DEFAULTTONEAREST)
out hMonitor
MONITORINFO mi
GetMonitorInfo(hMonitor &mi)
out mi.cbSize
out mi.dwFlags
out mi.rcWork.bottom
out mi.rcMonitor.right
Posts: 11,935
Threads: 138
Joined: Dec 2002
If a type has cbSize member, it always must be set before passing the variable to a function.
MONITORINFO mi.cbSize=sizeof(mi)
Posts: 1,271
Threads: 399
Joined: Mar 2003
every day a few more lessons to learn
thanks!