Jump to content
  • Advertisement
Sign in to follow this  
Pirosan

how to get users screen size

This topic is 5177 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
sounds like its taking into account the taskbar or something like that... use SM_CYVIRTUALSCREEN and SM_CXVIRTUALSCREEN instead

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.....

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yep, it seems they did change the behaviour of SM_CYSCREEN, just tried in win98 SE and it worked fine....

Share this post


Link to post
Share on other sites
yeah it worked! thanks for the help, this is definitly a good thing to have in my engine, and it will really make things easier.


Chris

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!