how to get users screen size
hey i was wondering if there is a simple function to determin the size of the user's window, so i can set the window to the correct size when i fullscreen the app? (in direct x or just c++)
thanks,
Chris
Two options:
or IDirect3D9::GetAdapterDisplayMode
ScreenWidth = GetSystemMetrics(SM_CXFULLSCREEN);ScreenHeight = GetSystemMetrics(SM_CYFULLSCREEN);
or IDirect3D9::GetAdapterDisplayMode
hm it says that it fails to create the device when and only when i use that function, i use the same function in non full screen and it has the same effect as if i used normal numbers..
EDIT: im using your first idea
EDIT: im using your first idea
after i did some debugging i noticed that the height was wronge. my computer is 1280 by 800 and the dimentions returned were 1280 by 740
any ideas?
any ideas?
in fact, if i go into 800x600 mode it returns the height as 540... so its always 60 off, but why?
sounds like its taking into account the taskbar or something like that... use SM_CYVIRTUALSCREEN and SM_CXVIRTUALSCREEN instead
SM_CYFULLSCREEN and SM_CYSCREEN both return the wrong values for me [in winxp], i think microsoft changed the behaviour of this and forgot to tell us, cause their documentation makes it sound like you are getting the FULL screen area not the full screen area minus the taskbar.....
yep, it seems they did change the behaviour of SM_CYSCREEN, just tried in win98 SE and it worked fine....
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement