Sign in to follow this  
Endar

CreateWindowEx and window size

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this