Archived

This topic is now archived and is closed to further replies.

silvermace

how thick is the title bar?

Recommended Posts

any idea on how many pixels thick the title bar is (on windows) im creating a windowed GL game, i want the reasertizer to have a screen res of 640x480, so im assuming the title bar is 20px so i create a window 640x500 ?? any advice ..thanx /silvermace

Share this post


Link to post
Share on other sites
Isn''t there a way using GetSystemMetrics() to retrieve those values? I''ve found that Windows 98 has a different size title bar than Windows XP, but I didn''t bother to fix that part of my program yet.

Share this post


Link to post
Share on other sites

  

GetSystemMetrics( SM_CYCAPTION );



And, from memory, you may need to add the border height to this value to get the true size from the topmost area of the window:


  

GetSystemMetrics( SM_CYBORDER );



Tom

Share this post


Link to post
Share on other sites
quote:
Original post by Beer Hunter
AdjustWindowRectEx determines the window size from the size of the client area.


Live and learn, here I am, 10+ year vet of windows programming and I''ve been using GetSystemMetrics all this time. And every time there has been an interface change (2->3, 3->95, 9x->xp) I had to ''fiddle'' the results.

Thank you


D.V.

Carpe Diem

Share this post


Link to post
Share on other sites
quote:
Original post by Ronin_54
Step 1: printscreen
Step 2: start mspaint
Step 3: paste
Step 4: look :D


Step 5: change fonts in screen properties
Step 6: look
Step 7: realise this is not good approach as the title bar has changed size.



D.V.

Carpe Diem

Share this post


Link to post
Share on other sites