Posts: 62
Threads: 22
Joined: Jul 2017
12-23-2020, 02:49 PM
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!!
Posts: 1,337
Threads: 61
Joined: Jul 2006
12-24-2020, 01:17 AM
(This post was last modified: 12-24-2020, 01:20 AM by Kevin.)
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}"
Posts: 62
Threads: 22
Joined: Jul 2017
12-24-2020, 11:47 AM
(This post was last modified: 12-24-2020, 11:52 AM by ScottF.
Edit Reason: Added: Question
)
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?
Posts: 1,337
Threads: 61
Joined: Jul 2006
couple more ways
RECT r
MonitorFromIndex 1 0 r;;first argument is monitor number
out "W=%i H=%i" r.right-r.left r.bottom-r.top
int wid hei
GetWorkArea 0 0 wid hei 1 3;;last argument is monitor number
out F"{wid} {hei}"
Posts: 62
Threads: 22
Joined: Jul 2017