Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetMonitorInfo
#1
i think the code is right, but 'MONITORINFO mi' always returns 0.
do you have an idea why ?

Code:
Copy      Help
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
pi
#2
If a type has cbSize member, it always must be set before passing the variable to a function.

MONITORINFO mi.cbSize=sizeof(mi)
#3
every day a few more lessons to learn Smile

thanks!
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)