Get desktop res?

Blitz3D Forums/Blitz3D Programming/Get desktop res?

big10p(Posted 2007) [#1]
This is probably a long-shot, but is there any way to get the desktop res without resorting to a DLL/userlib call?

I'm messing with a pure 2D vector GFX library and would not only like to keep it resolution independant, I'd also like to preserve a 1:1 aspect ratio (so a displayed square will look properly square, regarless of screen res).

In order to achieve this, I need to know what the desktop res is.

If this can't be done, I may simply not bother supporting a 1:1 aspect ratio - it seems Blitz3D itself doesn't bother. :P

Thanks.


Beaker(Posted 2007) [#2]
You need to use userlibbage. This will help:
http://www.blitzbasic.com/codearcs/codearcs.php?code=829
..particularly this bit:
win\DesktopW = User32_GetSystemMetrics(SM_CXSCREEN)
win\DesktopH = User32_GetSystemMetrics(SM_CYSCREEN)


big10p(Posted 2007) [#3]
Ah, OK, so you do need a userlib, then. Thanks, Beaker.


Matty(Posted 2007) [#4]
Don't know if it helps but blitzplus can get the desktop res, probably doesn't help much though if you want to do it with blitz3d.


big10p(Posted 2007) [#5]
Yeah, I saw that it the archives, but I'm using B3D.