Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Display Resolutions
#1
Question 
Get Display Resolutions

I have 3 monitors I need to get the resolutions for, 1 at a time.
I think I should be using GetMonitors function with [ARRAY(RECT)&aRectangles],
but I do not understand how to implement this. Could someone help?

Many thanks in advance!!
#2
Code:
Copy      Help
ARRAY(int) h; ARRAY(RECT) r
GetMonitors h r
int i
for i 0 h.len
,out h[i]
,out F"width ={r[i].right-r[i].left} height ={r[i].bottom-r[i].top}"
#3
Ah ok, that is what I had a problem implementing,
ARRAY(int) h; ARRAY(RECT) r
GetMonitors h r

I think I understand it now. Thanks Kevin.

Can this be done specifying one of three monitors?  1, 2 or 3 to get res?
#4
couple more ways
Code:
Copy      Help
RECT r
MonitorFromIndex 1 0 r;;first argument is monitor number
out "W=%i H=%i" r.right-r.left r.bottom-r.top
 
Code:
Copy      Help
int wid hei
GetWorkArea 0 0 wid hei 1 3;;last argument is monitor number
out F"{wid} {hei}"
#5
Very cool! Thanx.


Forum Jump:


Users browsing this thread: 1 Guest(s)