Jump to content
  • Advertisement
Sign in to follow this  
Endar

CreateWindowEx and window size

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

Just a quick question, when using CreateWindowEx, the height that we pass as the height of the window, that includes the caption right? So, if we pass 400 as the height, the caption is going to take up x amount of pixels, so the window height that we can actually draw in will be 400-x right?

Share this post


Link to post
Share on other sites
Advertisement
Yeah, it is the whole thing, including borders etc.

Also, since i ansewered your question i thought i might hijack this thread and ask a couple of related ones:

1) How do you determine the thickness of the borders and the caption frame at run time.
2) Does this vary with different themes?

Dave

Share this post


Link to post
Share on other sites
As Dave said, the size you pass to CreateWindowEx is the window size. If you want to specify a client area size, and get the OS to work out what size the window should be, look into AdjustWindowRect.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
As Dave said, the size you pass to CreateWindowEx is the window size. If you want to specify a client area size, and get the OS to work out what size the window should be, look into AdjustWindowRect.


Leg-end

Share this post


Link to post
Share on other sites
If you want to create a window with a specific client area you can use AdjustWindowRect().

Nevermind, beaten with a link to boot.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
Also, since i ansewered your question i thought i might hijack this thread and ask a couple of related ones:

1) How do you determine the thickness of the borders and the caption frame at run time.
2) Does this vary with different themes?
Ah, you edited your post while I was replying [smile]

1) See above
2) Yes.

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!