Jump to content
  • Advertisement
Sign in to follow this  
moeron

Figuring out "true" window size (SOLVED)

This topic is 4842 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

I've got a minor problem here. I'm writing a renderer plugin for a couple of 3d modeling programs and all is well in the world except for one issue. When I create a window to hold my rendering, I am using the measurements of the final image width / height. However, I need to take into account the size of dialog's border / system menu, etc because its chopping off the bottom / side few pixels. Is there a reliable way to calculate how many pixels the menu / border around the window is taking up? I suppose I could probably get the menu's rect, but I am unsure about how to get the dialog frame size. Thanks for any suggestions, moe.ron [Edited by - moeron on August 15, 2005 10:21:47 AM]

Share this post


Link to post
Share on other sites
Advertisement
@SiCrane - I don't think GetClientRect will help, let me try to explain a little better.

I have an image that is lets say 300 x 200. Currently when I call CreateWindow I am passing in the 300 x 200 dimension, so my final window is 300 x 200. The problem is the 300x200 is not just the viewable size of the screen, it is the whole size of the window, so some of the bottom and right side of my image gets clipped. I need to know how much space the dialog frame is taking up, because that is how much larger I need to create my window so that everything fits in at once. I'm pretty sure if I call GetClientRect its just going to return the 300 x 200..so that doesn't help me.

@DigitalDelusion - I'll look into AdjustWindowRect

Thanks for your quick responses guys,
moe.ron


Edit - The AdjustWindowRect is exactly what I needed, thanks again!

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!